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
Download
Trading history
OKX transaction tick level history. Data from 2021 onwards.
Download

Futures

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

Expiry and perpetual futures order book (tick-by-tick level)

OKX offers VIP users access to the last three months of historical order book data (tick level) for futures and perpetual futures

VIP request form
OKX permits the downloading of and use of historical market data (including OHLC data, trades, and order books) solely for your personal use and subject to these . If you intend to download and use historical market data for any other use (including but not limited to commercial use or monetization), please email with your request.