GET /api/v5/market/books

Auth X-Hub-Key from API_HUB_KEYExecute GET /run/web3okx/api/v5/market/booksCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing free

Public order book

Parameters

nameintypedescription
instIdquerystrrequired
example: BTC-USDT
szquerystroptional
example: 10

Response

type: array
pagination: none
sample: {
  "[0]": "object{asks:array[10] array[4] str,bids:array[10] array[4] str,ts:str,seqId:int}"
}

Safe request

Reads the credential from API_HUB_KEY; it never appears in the URL.

curl -sH "X-Hub-Key: $API_HUB_KEY" "https://openapihub.dev/run/web3okx/api/v5/market/books?instId=BTC-USDT&sz=10"