DEX Protocol Activity

GET/gateway/v1/onchain/dex/activity

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`).

Query Parameters

chainenum<string>required

Chain to query.

Available options:ethereumbasebscarbitrumtron
Example: ethereum
projectstring

DEX project name (e.g. `uniswap`, `pancakeswap`, `aerodrome`). Exactly one of `project` / `address` is required.

Example: uniswap
addressstring

A specific router/contract measured as `tx_to`. Exactly one of `project` / `address` is required.

Example: 0x1111111254eeb25477b68fb85ed929f73a960582
time_rangeenum<string>

Look-back window (hard 90d cap). Overridden by `from`/`to` when set.

Available options:1d7d30d90d
fromstring

Start of range — Unix seconds or YYYY-MM-DD. With `to`, the range may span at most 90 days.

Example: 2025-01-01
tostring

End of range — Unix seconds or YYYY-MM-DD. Without `from`, the window is `time_range` ending at `to`.

Example: 2025-02-01
group_byenum<string>

`total` = single aggregate; `day` = daily series (newest first).

Available options:totalday
DEX Protocol Activity
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/onchain/dex/activity?chain=ethereum&project=uniswap&address=0x1111111254eeb25477b68fb85ed929f73a960582&from=2025-01-01&to=2025-02-01', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseDexActivityItem.json",
  "data": [
    {
      "active_traders": 123,
      "enriched_ratio": 123,
      "timestamp": 123,
      "trades": 123,
      "volume_usd": 123
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}