Historical Spot API Reference
- Last updated: 2026-03-11
- Scope: Binance, OKX, Bybit spot historical trades and klines
Endpoints
Trades:
POST /v1/historical/binance/spot/tradesPOST /v1/historical/okx/spot/tradesPOST /v1/historical/bybit/spot/trades
Klines:
POST /v1/historical/binance/spot/klinesPOST /v1/historical/okx/spot/klinesPOST /v1/historical/bybit/spot/klines
All endpoints require X-API-Key.
Historical scope in this tranche includes active spot dataset contracts only.
Request contracts
Trades request:
mode: native | aligned_1s(defaultnative)start_date: YYYY-MM-DD | nullend_date: YYYY-MM-DD | nulln_latest_rows: int | nulln_random_rows: int | nullfields: string[] | nullfilters: object[] | null(eq|ne|gt|gte|lt|lte|in|not_in)include_datetime_col: bool(defaulttrue)strict: bool(defaultfalse)
Klines request:
mode: native | aligned_1s(defaultnative)start_date: YYYY-MM-DD | nullend_date: YYYY-MM-DD | nulln_latest_rows: int | nulln_random_rows: int | nullfields: string[] | nullfilters: object[] | null(eq|ne|gt|gte|lt|lte|in|not_in)kline_size: int(seconds,> 0)strict: bool(defaultfalse)
At most one window mode is allowed:
- date-window (
start_dateand/orend_date) n_latest_rowsn_random_rows
If no selector is provided, window defaults to full available history (earliest -> now).
Date semantics:
- start is inclusive at
00:00:00Z - end day is inclusive via next-day exclusive query bound
- open date bounds are resolved from available source data range
Response contract
Response fields:
modesourcesourcesrow_countschemawarningsrowsrights_staterights_provisional
Schema taxonomy
Trades rows (all exchanges):
mode=native:trade_idtimestamppricequantityis_buyer_makerdatetime(optional ifinclude_datetime_col=false)
mode=aligned_1s:aligned_at_utcopen_pricehigh_pricelow_priceclose_pricequantity_sumquote_volume_sumtrade_count
Klines rows (all exchanges):
mode=native:datetimeopen,high,low,closemean,std,median,iqrvolume,maker_ratio,no_of_tradesopen_liquidity,high_liquidity,low_liquidity,close_liquidityliquidity_sum,maker_volume,maker_liquidity
mode=aligned_1s:datetimeopen,high,low,closevolumeno_of_tradesliquidity_sum
Mapping for OKX/Bybit:
- source
side=buy=>is_buyer_maker=0 - source
side=sell=>is_buyer_maker=1
Errors
200: success404: no data in selected window409: contract/auth/strict-warning failures503: runtime/backend failure
Current mode status on historical spot routes:
- Trades routes:
native: supportedaligned_1s: supported
- Klines routes:
native: supportedaligned_1s: supported