Tokens API
A token's price and daily volume history, as candles
A token's price and volume history: open/high/low/close and USD volume per bucket, 1m to 1d, each flagged if closed. Sum daily candles for a 7-day or 30-day volume.
/api/external/token-analysis/ohlcv/{chain}/{mint}What it returns
A token's price and USD trading volume history, one candle per bucket, oldest first. When volumeScope is all-pools, each candle counts every pool, the same scope as the 24h volume tool, so the daily candles add up to the token's 7-day or 30-day volume.
Chains
- Solana SOL
- BNB Chain BNB
- Ethereum ETH
- Stable STABLE
- Base BASE
- Robinhood Chain RHC
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/token-analysis/ohlcv/SOL/<mint>?interval=1m&from=<from>&to=<to>"
| Parameter | Description |
|---|---|
intervalquery · string · required | Candle width. This set is what every wired source understands; a width only one of them knows would make the answer depend on which one replied.1m5m15m1h4h1d |
fromquery · integer · required | Window start, Unix SECONDS. A candle is returned when its OPEN is at or after this time, so a from that does not land exactly on a bucket boundary excludes the bucket it falls inside — up to a full interval of history, 24h at 1d. Align from to a bucket open (a multiple of the interval in seconds, UTC) to get the bucket you are standing in. |
toquery · integer · required | Window end, Unix SECONDS. Inclusive. At most 1,000 candles fit in one request — a wider window returns 400 rather than a silently truncated series. A window of ≤ 150 candles keeps the answer under 32 KB. |
chainpath · string · required | The chain the token lives on. ARC returns 400 — no wired source charts it. CELO, ARB, OP and SCROLL return 400 here. |
mintpath · string · required | The token mint address (Solana) or contract address (EVM). |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
interval | string | |
volumeScope | string | null | What volumeUsd covers. all-pools: every pool the token trades in — the same scope as the volume tool's usd24h, so daily candles sum to a 7-day or 30-day volume comparable with it. primary-pool: the busiest pool only — a sum of these understates the token's trading, often by half or more, and must not be compared with usd24h. null when there are no candles. |
candles | object[] | |
candles[].at | number | |
candles[].open | number | null | |
candles[].high | number | null | |
candles[].low | number | null | |
candles[].close | number | null | |
candles[].volumeUsd | number | null | USD traded in the bucket, over the pools volumeScope names. null when the source did not report it, which is not the same as nothing traded. |
candles[].volumeToken | number | null | |
candles[].complete | boolean |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key