DEX Token OHLCV Price

GET/gateway/v1/dex/token/price

Returns DEX-pool-weighted OHLCV bars (timestamp, open, high, low, close, volume_usd) for a single token identified by `chain` + `address`. USD only. Bars are sorted ascending by `timestamp`.

Use for meme coins, newly-launched tokens, and any DEX-native asset where `/v1/market/price` returns nothing. Prefer the standard `/v1/market/price` for major listed tokens (BTC, ETH, etc.).

Time window: `time_range` (default `24h`) sets the window; `from`+`to` (Unix seconds or `YYYY-MM-DD`) override it. Bars use closed-interval semantics, so `24h × 1h` returns 25 bars. Maximum 1500 bars per call — combinations exceeding the cap (e.g. `30d × 5m`) return 422. `time_range=max` returns the largest allowed 1500-bar window for the selected interval.

Identity: `chain` (enum) + `address` (EVM hex or Solana base58). No symbol input.

Query Parameters

chainenum<string>required

Chain the token lives on. Can be `ethereum`, `base`, `bsc`, `arbitrum`, `optimism`, `polygon`, `avalanche`, or `solana`.

Available options:ethereumbasebscarbitrumoptimismpolygonavalanchesolana
Example: ethereum
addressstringrequired

Token contract address — 0x-prefixed hex (42 chars) for EVM chains, base58 for Solana. NOT a ticker symbol.

Example: 0x6982508145454ce325ddbe47a25d4ec3d2311933
intervalenum<string>

Candle bucket size. Sub-day intervals (`1m`-`4h`) are the typical choice for active DEX analysis.

Available options:1m5m15m30m1h4h12h1d7d
Example: 1h
time_rangeenum<string>

Window of historical data to return. `max` returns the largest allowed 1500-bar window for the selected interval. Ignored when both `from` and `to` are set.

Available options:1h6h12h24h7d30d90d180d365dmax
Example: 24h
fromstring

Start of custom date range (Unix seconds or YYYY-MM-DD). Must be set together with `to`. Overrides `time_range` when set.

Example: 2026-01-01
tostring

End of custom date range (Unix seconds or YYYY-MM-DD). Must be set together with `from`. Overrides `time_range` when set.

Example: 2026-01-02
DEX Token OHLCV Price
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/dex/token/price?chain=ethereum&address=0x6982508145454ce325ddbe47a25d4ec3d2311933&interval=1h&time_range=24h&from=2026-01-01&to=2026-01-02', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/SimpleListResponseDexTokenPriceBar.json",
  "data": [
    {
      "close": 123,
      "high": 123,
      "low": 123,
      "open": 123,
      "timestamp": 123,
      "volume_usd": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>"
  }
}