Historical market data

OKX supports downloading historical market data including OHLC data, trades, and order books

Spot

Candle Stick (OHLC Data)
Retrieve all historical OKX chart (OHLC Chart) data
Aggregate trades
Aggregated orders filled at a given price
Trading history
OKX transaction tick level history. Data from 2021 onwards.

Futures

Candle Stick (OHLC Data)
Retrieve all historical OKX chart (OHLC Chart) data
Aggregate trades
Aggregated orders filled at a given price
Trading history
OKX transaction tick level history. Data from 2021 onwards.
Perpetual swaps funding rates
Download all perpetual swap funding rates history from 2021

Futures and Perpetual Swap Order Book (tick-by-tick level)

OKX VIP users request on demand, provides recent 3 months Futures and Swap order book history (tick level)

VIP request form