---
title: "Tokens with trades within the last active_within seconds, with metrics per window."
method: GET
path: "/v1/dextrades/activity"
tags: ["DexTrades"]
---

# Tokens with trades within the last active_within seconds, with metrics per window.

`GET /v1/dextrades/activity`

## Query parameters

- `active_within` integer, required — Activity window in seconds (tokens with trades within it are returned)
- `windows` integer[], required — Metric windows in seconds, each ending now (1..8 entries)

## Response `200`

Active tokens ordered by activity-window volume descending, then by token (deterministic). CONTRACT: a token is absent from the response if and only if it had no trades within active_within; consumers may rely on absence to zero out their stats. Any future response size limit must be announced explicitly (flag/header), never applied silently.

- ApiDexActivityToken[]
  - `token` string, required
  - `price_usd` number, double, required — Close of the latest bar
  - `tvl_usd` number, double, nullable — Sum of TVL of yield pools containing the token; null until yield state is warmed up
  - `pools_count` integer, nullable
  - `windows` ApiDexActivityWindow[], required — One entry per requested window (deduplicated, sorted ascending), always present even if the window had no trades (zero volumes/counters, change null). trades_total == 0 is the definitive "no trades in this window" marker.
    - `window` integer, required — Window length in seconds (aligned up to a minute)
    - `change` number, double, nullable — Relative price change over the window (0.05 = +5%); null if no bars in window
    - `volume_usd_total` number, double, required
    - `volume_usd_buy` number, double, required
    - `volume_usd_sell` number, double, required
    - `trades_total` integer, required
    - `trades_buy` integer, required
    - `trades_sell` integer, required
    - `uniq_traders` integer, required
    - `uniq_buyers` integer, required
    - `uniq_sellers` integer, required

## Other responses

- `default` — Some error during request processing

---

[API](https://skmtc.net/swap/apis/swap-coffee-api.md) · [All operations](https://skmtc.net/swap/apis/swap-coffee-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/swap/swap-coffee-api/revisions/8f32977bfb50/schema)
