GET /priapi/v5/dex/token/market/dex-token-hlc-candles

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

DEX token OHLCV candlesticks across supported chains and intervals (1s to 1M)

Signed with ok-verify-sign / ok-verify-token / devid. Returns descending OHLCV arrays [ts_ms, open, high, low, close, vol, volUsd, confirm]. Client maps tokenContractAddress alias to address and injects t automatically.

Parameters

nameintypedescription
chainIdquerystrrequiredNumeric chain ID (1=Ethereum, 56=BSC, 8453=Base, 501=Solana, 137=Polygon, 42161=Arbitrum)
example: 501
addressquerystrrequiredToken contract address (alias tokenContractAddress also accepted by client)
example: So11111111111111111111111111111111111111112
barquerystr
1s | 5s | 15s | 30s | 1m | 3m | 5m | 15m | 30m | 1H | 2H | 4H | 6H | 12H | 1D | 1W | 1M | 1Dutc | 1Wutc | 1Mutc
optionalCandle interval
default: 1m
example: 1m
limitqueryintoptionalNumber of candles (1..1000)
default: 100
example: 100
afterquerystroptionalPagination cursor: return candles older than this epoch-ms timestamp
example:
beforequerystroptionalPagination cursor: return candles newer than this epoch-ms timestamp
example:

Response

type: array
pagination: none
sample: {
  "[0]": "array[8] [ts_ms:str, open:str, high:str, low:str, close:str, vol:str, volUsd:str, confirm:str]"
}

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/priapi/v5/dex/token/market/dex-token-hlc-candles?chainId=501&address=So11111111111111111111111111111111111111112&bar=1m&limit=100&after=&before="