Delivers historical OHLCV (Open, High, Low, Close, Volume) data in batch format for multiple Spot market trading pairs, providing comprehensive price and volume history over specified time ranges for efficient analysis across multiple assets.
Time Range & Data Availability Limit
The maximum time range (difference between startDate and endDate) is:
- 62 days of daily, hourly or minutely data
- This endpoint only stores the most recent 62 days of data.
- Queries with a
startDate
older than 62 days from the current date will result in a 410 error.In order to get more than the maximum allowed, you can use the Historical endpoint found here .
Not specifying startDate and endDate
If you omit
startDate
andendDate
, the API will return the most recent 62 days of daily data (not data older than 62 days from the current date).
๐จ Important Notice for BitMEX Data ๐จ
BitMEXโs volume
field represents the number of contracts traded, not the volume in the base asset. To obtain the correct volume, users must adjust for contract size using underlyingToPositionMultiplier
from our Reference endpoint.
For details on this calculation and how to retrieve the correct values, see our Changelog Update.
RESPONSE DATA
JSON Field/Path | Field Type | Description |
---|---|---|
payload.metadata.columns | array | An array of strings that represents the columns returned in the OHLCV data. Typically includes "timestamp", "open", "high", "low", "close", and "volume". |
payload.metadata.startDate | number | The timestamp in milliseconds representing the start date for the historical OHLCV data range. |
payload.metadata.endDate | number | The timestamp in milliseconds representing the end date for the historical OHLCV data range. |
payload.data.{instrument}[{index}][0] | number | The timestamp in milliseconds for the OHLCV data at the specified index for the given instrument. |
payload.data.{instrument}[{index}][1] | number | The opening price of the trading pair at the specified timestamp. |
payload.data.{instrument}[{index}][2] | number | The highest price of the trading pair during the specified time period. |
payload.data.{instrument}[{index}][3] | number | The lowest price of the trading pair during the specified time period. |
payload.data.{instrument}[{index}][4] | number | The closing price of the trading pair at the specified timestamp. |
payload.data.{instrument}[{index}][5] | number | The total volume of the trading pair traded during the specified time period, in the base currency. |