{
  "id": "surf.dex.token.price",
  "object": "tool",
  "name": "DEX Token OHLCV Price",
  "summary": "Returns DEX-pool-weighted OHLCV bars (timestamp, open, high, low, close, volume_usd) for a single token identified by chain + address.",
  "description": "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.\n\nRaw surf#dex/token/price endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai/data-api/dex/token-price).",
  "category": "lookup",
  "hosted_by": "Surf",
  "runtime": "partner",
  "side_effects": false,
  "status": "live",
  "credits": 0,
  "price": null,
  "providers": [
    {
      "id": "surf",
      "name": "Surf",
      "price": null,
      "own_key_only": true
    }
  ],
  "mcp_name": "surf_dex_token_price",
  "input_schema": {
    "type": "object",
    "properties": {
      "queryParams": {
        "type": "object",
        "properties": {
          "chain": {
            "type": "string",
            "enum": [
              "ethereum",
              "base",
              "bsc",
              "arbitrum",
              "optimism",
              "polygon",
              "avalanche",
              "solana"
            ],
            "description": "Chain the token lives on. Can be ethereum, base, bsc, arbitrum, optimism, polygon, avalanche, or solana. Example: ethereum."
          },
          "address": {
            "type": "string",
            "minLength": 1,
            "description": "Token contract address — 0x-prefixed hex (42 chars) for EVM chains, base58 for Solana. NOT a ticker symbol. Example: 0x6982508145454ce325ddbe47a25d4ec3d2311933."
          },
          "interval": {
            "default": "1h",
            "type": "string",
            "enum": [
              "1m",
              "5m",
              "15m",
              "30m",
              "1h",
              "4h",
              "12h",
              "1d",
              "7d"
            ],
            "description": "Candle bucket size. Sub-day intervals (1m-4h) are the typical choice for active DEX analysis. Example: 1h. Defaults to \"1h\"."
          },
          "time_range": {
            "default": "24h",
            "type": "string",
            "enum": [
              "1h",
              "6h",
              "12h",
              "24h",
              "7d",
              "30d",
              "90d",
              "180d",
              "365d",
              "max"
            ],
            "description": "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. Example: 24h. Defaults to \"24h\"."
          },
          "from": {
            "type": "string",
            "minLength": 1,
            "description": "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."
          },
          "to": {
            "type": "string",
            "minLength": 1,
            "description": "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."
          }
        },
        "required": [
          "chain",
          "address"
        ],
        "additionalProperties": false
      }
    },
    "required": [
      "queryParams"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}