---
title: "DEX Protocol Activity"
method: GET
path: "/gateway/v1/onchain/dex/activity"
tags: ["Onchain"]
---

# 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

- `chain` 'ethereum' | 'base' | 'bsc' | 'arbitrum' | 'tron', required — Chain to query.
- `project` string — DEX project name (e.g. `uniswap`, `pancakeswap`, `aerodrome`). Exactly one of `project` / `address` is required.
- `address` string — A specific router/contract measured as `tx_to`. Exactly one of `project` / `address` is required.
- `time_range` '1d' | '7d' | '30d' | '90d' — Look-back window (hard 90d cap). Overridden by `from`/`to` when set.
- `from` string — Start of range — Unix seconds or YYYY-MM-DD. With `to`, the range may span at most 90 days.
- `to` string — End of range — Unix seconds or YYYY-MM-DD. Without `from`, the window is `time_range` ending at `to`.
- `group_by` 'total' | 'day' — `total` = single aggregate; `day` = daily series (newest first).

## Response `200`

OK

- DataResponseDexActivityItem
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `data` DexActivityItem[], nullable, required
    - `active_traders` integer, required — Distinct swap initiators — uniq(taker), ~1% error.
    - `enriched_ratio` number, double — Fraction of trades that are USD-priced (0..1) — lets the caller judge volume_usd completeness. Absent when there are no trades in the window.
    - `timestamp` integer — Start-of-day Unix seconds; present only when group_by=day.
    - `trades` integer, required — Trade count.
    - `volume_usd` number, double — USD volume. Absent when no trades in the window are USD-priced; undercounts recent days (USD pricing lags ~3 days).
  - `meta` OffsetMeta, required
    - `cached` boolean, required — Whether this response was served from cache
    - `credits_used` integer, required — Credits deducted for this request
    - `empty_reason` string — Hint explaining why the data array is empty, when applicable
    - `has_more` boolean — Whether more items may exist beyond this response. For offset-paged endpoints, continue with a larger offset. For time-series endpoints without offset/cursor controls, true means the requested time range hit an upstream cap; narrow from/to to continue. Omitted when exhaustion cannot be proven.
    - `limit` integer, required — Maximum number of items returned in this response
    - `offset` integer, required — Number of items skipped (pagination offset)
    - `total` integer — Total number of matching items (before pagination). Omitted when total is unknown.
    - `watermark` integer — Warehouse watermark (Unix seconds) this response was computed at, on warehouse-backed endpoints (e.g. Hyperliquid /trades/aggregate) — rows up to this time come from the warehouse, newer rows from the live tail. Omitted elsewhere.

## Other responses

- `default` — Error

---

[API](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api.md) · [All operations](https://skmtc.dev/asksurf/apis/asksurf-public-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/asksurf/asksurf-public-rest-api/revisions/4153a9cb5145/schema)
