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 futures funding rates
Download all perpetual futures funding rates history from 2021

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 Terms of Service. 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 bd_intro@okx.com with your request.