Skip to navigation

Get historical market data

Retrieve downloadable historical market-data file groups (trades, candles, funding rate, order book, borrowing rate) for the requested instruments and date range.

Query parameters

modulestringRequired

Data module: 1 (trades), 2 (1m candles), 3 (funding rate), 4 (400-level order book), 5 (5000-level order book), 6 (50-level order book), 11 (borrowing rate).

instTypeenumRequired
Instrument type.
Allowed values:
instIdListstringOptional

List of instrument IDs, e.g. BTC-USDT. Either instIdList or instFamilyList is required.

instFamilyListstringOptional

List of instrument families, e.g. BTC-USD. Either instIdList or instFamilyList is required.

dateAggrTypeenumRequired
Date aggregation type of the returned file groups.
Allowed values:
beginstringRequired
Start date, Unix timestamp in milliseconds.
endstringRequired
End date, Unix timestamp in milliseconds.

Response

Successful response
codestringOptional

Result code. 0 means success; any other value is an error code.

msgstringOptional
Error message. Empty on success.
datalist of objectsOptional