A key feature of any investing platform is displaying a historical chart of a selected security. DriveWealth provides historical data in pipe delineated form, based on the time and compression range indicated in the API request.

For example, retrieving daily pricing details over the last 30 trading days for an asset would be requested in the following manner:

ο»Ώ

The `data` always follows the same structure and is what should be utilized to build a chart: {timestamp}, open, high, low, close, volume). When consuming the data it’s generally recommended to plot the chart given the `close` price of that given day.

## Choosing different compressions

To determine which compression value to use will depend on what timeframe your user wants displayed. For example, if a user wants to see how a particular security did for a single day, use a smaller compression value, like 5 minutes or even 1 minute. When a user views a longer time frame, like one week, using a 30 minute or 1 hour compression rate is more suitable. The lower the compression value the more data you will receive for a given period.

Use the following table to determine which compression value is used most commonly:

Compression ValueTime Increment
01 Day
11 Minute
45 Minutes
830 Minutes
91 Hour
101 Week