OKX
communityGlobal top-5 cryptocurrency exchange with spot, futures, options, and perpetual trading for 300+ digital assets, plus DeFi wallet and Web3 services with 50+ million users.
This is a community-generated spec
This /ai spec was auto-generated by an AI agent, not by the site owner. It may be incomplete or inaccurate.
GET
/api/v5/market/tickerGet current market ticker data
Parameters
instIdinstrument ID (stringrequired— e.g. BTC-USDT)Returns
data[] with instId, last, lastSz, askPx, bidPx, open24h, high24h, low24h, vol24h, tsGET
/api/v5/market/booksGet order book for a trading pair
Parameters
szdepth size 1-400 (stringoptionalinstIdinstrument ID (stringrequiredReturns
data[] with asks[], bids[], tsGET
/api/v5/market/candlesGet OHLCV candlestick data
Parameters
bar1m|5m|15m|1H|4H|1D (stringoptionallimitintegeroptionalinstIdinstrument ID (stringrequiredReturns
data[] with ts, open, high, low, close, vol, volCcy