Provides historical OHLCV (Open, High, Low, Close, Volume) data for Spot market trading pairs, enabling analysis of price movements and trading volumes over time across supported exchanges.
⚠️ IMPORTANT UPDATE ⚠️
Important Update
The old endpoint
https://api.amberdata.com/market/spot/ohlcv/{pair}/historical
has been updated tohttps://api.amberdata.com/markets/spot/ohlcv/:instrument
and is no longer being supported. Please update your integrations accordingly.See changes here
- Endpoint URL Change:
- Old:
https://api.amberdata.com/market/spot/ohlcv/{pair}/historical
- New:
https://api.amberdata.com/markets/spot/ohlcv/{instrument}
- Metadata Changes:
- Removed
columns
,startDate
,endDate
.- Added
next
for pagination andapi-version
.- Data Structure Changes:
- The
data
object has been changed from a nested JSON object with arrays to an array of JSON objects.- New fields
instrument
,exchange
,exchangeTimestamp
,open
,high
,low
,close
, andvolume
.- Field Value Changes:
- The structure of OHLCV data has changed significantly to a more detailed and explicit format.
- Other
- The
exchange
parameter is now a required field- Add the
Accept-Encoding
header to your requests to benefit from data compression and improved performance.
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 previous 12 months of daily data.
RESPONSE DATA
JSON Field/Path | Field Type | Description |
---|---|---|
payload.metadata.next | string | The URL for the next page of results, if there are more results to fetch. It is a paginated cursor that allows the client to retrieve subsequent data. |
payload.metadata.api-version | string | The version of the API being used, indicated as a date string in the format YYYY-MM-DD. |
payload.data[{index}].instrument | string | The trading pair or instrument identifier, such as "eth_usd". |
payload.data[{index}].exchange | string | The name of the exchange where the data originates, such as "gdax". |
payload.data[{index}].exchangeTimestamp | number | The timestamp from the exchange in milliseconds for when the OHLCV data was captured. |
payload.data[{index}].open | number | The opening price of the trading pair for the specified time period. |
payload.data[{index}].high | number | The highest price of the trading pair during the specified time period. |
payload.data[{index}].low | number | The lowest price of the trading pair during the specified time period. |
payload.data[{index}].close | number | The closing price of the trading pair for the specified time period. |
payload.data[{index}].volume | number | The total volume of the trading pair traded during the specified time period, in the base currency. |