DEX Trade History

GET/gateway/v1/token/dex-trades

Returns recent DEX swap events for a token contract address.

Covered DEXes: `uniswap`, `sushiswap`, `curve`, `balancer`, `pancakeswap` (and other major DEXes per chain).

Included fields: trading pair, amounts, USD value, taker address.

Data refresh: ~24 hours · Chains: Ethereum, Base, BSC, Arbitrum, Tron

Query Parameters

addressstringrequired

Token CONTRACT ADDRESS — 0x-prefixed hex (EVM chains only; Tron also accepts base58 `T...`). This is NOT a ticker symbol (e.g. do NOT pass `USDC` or `BTC`). To resolve a ticker symbol to a contract address, call GET /v1/search/token?q={symbol}&chain={chain} and use the `address` whose `chain` is supported by this endpoint. This endpoint has no `symbol` parameter.

Example: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
chainenum<string>

Chain. Can be `ethereum`, `base`, `bsc`, `arbitrum`, or `tron`.

Available options:ethereumbasebscarbitrumtron
Example: ethereum
limitinteger

Results per page

Example: 20
offsetinteger

Pagination offset

Example: 0
includestring

Comma-separated enrichments to attach to each trade. Currently valid: `labels` — adds a `taker_label` field with entity information for the taker address.

Example: labels
DEX Trade History
const options = {method: 'GET'};

fetch('https://api.asksurf.ai/gateway/v1/token/dex-trades?address=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&chain=ethereum&limit=20&offset=0&include=labels', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
OK
{
  "$schema": "https://example.com/schemas/DataResponseDexTradeItem.json",
  "data": [
    {
      "amount_usd": 123,
      "block_time": 123,
      "project": "<string>",
      "taker": "<string>",
      "taker_label": {
        "address": "<string>",
        "entity_name": "<string>",
        "entity_type": "<string>",
        "labels": [
          {
            "confidence": 123,
            "label": "<string>"
          }
        ]
      },
      "token_bought_address": "<string>",
      "token_bought_amount": 123,
      "token_bought_symbol": "<string>",
      "token_pair": "<string>",
      "token_sold_address": "<string>",
      "token_sold_amount": 123,
      "token_sold_symbol": "<string>",
      "tx_hash": "<string>",
      "version": "<string>"
    }
  ],
  "meta": {
    "cached": true,
    "credits_used": 123,
    "empty_reason": "<string>",
    "has_more": true,
    "limit": 123,
    "offset": 123,
    "total": 123,
    "watermark": 123
  }
}