Delivers historical OHLCV (Open, High, Low, Close, Volume) data for futures instruments, including timestamps, price levels, and trading volume across exchanges.
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.
🚨 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 | Value Type | Description |
---|---|---|
payload.metadata.next | string | The URL for the next page of data (nullable if there is no next page). |
payload.metadata.api-version | string | The version of the API used for this request. |
payload.data[].instrument | string | The instrument or trading pair for which OHLCV data is recorded (e.g., BTCUSD_PERP). |
payload.data[].exchange | string | The name of the exchange where the OHLCV data applies (e.g., binance). |
payload.data[].exchangeTimestamp | integer | The timestamp from the exchange in milliseconds since epoch. |
payload.data[].open | float | The opening price of the instrument for the specified timestamp. |
payload.data[].high | float | The highest price of the instrument for the specified timestamp. |
payload.data[].low | float | The lowest price of the instrument for the specified timestamp. |
payload.data[].close | float | The closing price of the instrument for the specified timestamp. |
payload.data[].volume | float | The trading volume for the instrument during the specified timestamp. |