GET /priapi/v5/dex/token/market/history-dex-token-hlc-candles
Auth X-Hub-Key from API_HUB_KEYExecute
GET /run/web3okx/priapi/v5/dex/token/market/history-dex-token-hlc-candlesCache cached 1s, never served stale past that windowCost free · weight 0 · standard rate classSource billing freeHistorical DEX token OHLCV candlesticks for deep backfill pagination
Historical archive companion to dex-token-hlc-candles; same 8-column OHLCV array format [ts_ms, open, high, low, close, vol, volUsd, confirm].
Parameters
| name | in | type | description | |
|---|---|---|---|---|
chainId | query | str | required | Numeric chain ID (1=Ethereum, 56=BSC, 8453=Base, 501=Solana) example: 501 |
address | query | str | required | Token contract address (alias tokenContractAddress also accepted by client) example: So11111111111111111111111111111111111111112 |
bar | query | str1s | 5s | 15s | 30s | 1m | 3m | 5m | 15m | 30m | 1H | 2H | 4H | 6H | 12H | 1D | 1W | 1M | 1Dutc | 1Wutc | 1Mutc | optional | Candle interval default: 1Hexample: 1H |
limit | query | int | optional | Number of candles (1..1000) default: 100example: 100 |
after | query | str | optional | Pagination cursor: return candles older than this epoch-ms timestamp example: |
before | query | str | optional | Pagination 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/history-dex-token-hlc-candles?chainId=501&address=So11111111111111111111111111111111111111112&bar=1H&limit=100&after=&before="