{
  "id": "surf.onchain.dex.activity",
  "object": "tool",
  "name": "DEX Protocol Activity",
  "summary": "Active traders, trade count, and USD volume for a DEX protocol (or a specific router contract), as a single aggregate or a daily series (group_by=day).",
  "description": "Active traders, trade count, and USD volume for a DEX protocol (or a specific router contract), as a single aggregate or a daily series (group_by=day). Lookup: chain + exactly one of project (e.g. uniswap, pancakeswap) or address (a router measured as tx_to). Related: per-swap rows for a single token → /v1/token/dex-trades. Chains: Ethereum, Base, BSC, Arbitrum, Tron · Refresh: ~24h · USD volume lags ~3 days (see enriched_ratio).\n\nRaw surf#onchain/dex/activity endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.asksurf.ai/data-api/onchain/dex-activity).",
  "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_onchain_dex_activity",
  "input_schema": {
    "type": "object",
    "properties": {
      "queryParams": {
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "chain": {
                "type": "string",
                "enum": [
                  "ethereum",
                  "base",
                  "bsc",
                  "arbitrum",
                  "tron"
                ],
                "description": "Chain to query. Example: ethereum."
              },
              "project": {
                "type": "string",
                "minLength": 1,
                "description": "DEX project name (e.g. uniswap, pancakeswap, aerodrome). Exactly one of project / address is required. Example: uniswap."
              },
              "time_range": {
                "type": "string",
                "enum": [
                  "1d",
                  "7d",
                  "30d",
                  "90d"
                ],
                "description": "Look-back window (hard 90d cap). Overridden by from/to when set. Defaults to \"7d\"."
              },
              "from": {
                "type": "string",
                "minLength": 1,
                "description": "Start of range — Unix seconds or YYYY-MM-DD. With to, the range may span at most 90 days. Example: 2025-01-01."
              },
              "to": {
                "type": "string",
                "minLength": 1,
                "description": "End of range — Unix seconds or YYYY-MM-DD. Without from, the window is time_range ending at to. Example: 2025-02-01."
              },
              "group_by": {
                "type": "string",
                "enum": [
                  "total",
                  "day"
                ],
                "description": "total = single aggregate; day = daily series (newest first). Defaults to \"total\"."
              }
            },
            "required": [
              "chain",
              "project"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "chain": {
                "type": "string",
                "enum": [
                  "ethereum",
                  "base",
                  "bsc",
                  "arbitrum",
                  "tron"
                ],
                "description": "Chain to query. Example: ethereum."
              },
              "address": {
                "type": "string",
                "minLength": 1,
                "description": "A specific router/contract measured as tx_to. Exactly one of project / address is required. Example: 0x1111111254eeb25477b68fb85ed929f73a960582."
              },
              "time_range": {
                "type": "string",
                "enum": [
                  "1d",
                  "7d",
                  "30d",
                  "90d"
                ],
                "description": "Look-back window (hard 90d cap). Overridden by from/to when set. Defaults to \"7d\"."
              },
              "from": {
                "type": "string",
                "minLength": 1,
                "description": "Start of range — Unix seconds or YYYY-MM-DD. With to, the range may span at most 90 days. Example: 2025-01-01."
              },
              "to": {
                "type": "string",
                "minLength": 1,
                "description": "End of range — Unix seconds or YYYY-MM-DD. Without from, the window is time_range ending at to. Example: 2025-02-01."
              },
              "group_by": {
                "type": "string",
                "enum": [
                  "total",
                  "day"
                ],
                "description": "total = single aggregate; day = daily series (newest first). Defaults to \"total\"."
              }
            },
            "required": [
              "chain",
              "address"
            ],
            "additionalProperties": false
          }
        ]
      }
    },
    "required": [],
    "additionalProperties": false
  },
  "kind": "endpoint"
}