Retrieves the historical time series OHLCV data for the specified instrument and exchange(s). Note: Block trades are included in the calculation of OHCLV for Deribit.
Important Update
The old endpoint
https://api.amberdata.com/market/options/ohlcv/{instrument}/historical
has been updated tohttps://api.amberdata.com/markets/options/ohlcv/{instrument}
. The old endpoint will be deprecated on 2024-10-31. Please update your integrations accordingly.See changes here
- Endpoint URL Change:
- Old:
https://api.amberdata.com/market/options/ohlcv/{instrument}/historical
- New:
https://api.amberdata.com/markets/options/ohlcv/{instrument}
- Metadata Changes:
- New fields
api-version
andnext
are introduced in the metadata object.startDate
andendDate
fields were removed.- Data Structure Changes:
- The data structure remains an array of JSON objects, but the fields within each object have changed slightly.
- Field Changes:
- Added the
instrument
field- Renamed
timestamp
toexchangeTimestamp
- Other
- The
exchange
parameter is now a required field- Include the
Accept-Encoding:
header in your API requests to take advantage of compressed responses.
Time Range Limit
The maximum time range (difference between startDate and endDate) is 2 years.
In order to get more than the maximum allowed, you can use the
startDate
&endDate
parameters to move the time frame window to get the next n days/hours/minutes of data.
Not specifying startDate and endDate
If the startDate and endDate query parameters are not provided, the API will return the data from the previous 24 hours with a 1 minute frequency.
RESPONSE DATA
Field | Type | Description |
---|---|---|
{metadata} | object | The metadata associated with the data. |
{metadata}.startDate | number | string | The first date/time for which data is available. |
{metadata}.endDate | number | string | The last date/time for which data is available. |
[data] | array | The OHLCV data corresponding to the columns fields, aggregated by exchange. |
[data].exchange | string | The name of the exchange. |
[data].timestamp | number | string | The time at which the event occurred. |
[data].open | number | The value when the bar/time interval started. |
[data].high | number | The highest value within the bar/time interval. |
[data].low | number | The lowest value within the bar/time interval. |
[data].close | number | The value when the bar/time interval closed. |
[data].volume | number | The volume within the bar/time interval. |