For the complete documentation index, see llms.txt. This page is also available as Markdown.

Historical Token DEX Trades

Note: This is a beta endpoint (/api/v1beta1/). Request shapes, response fields, and pricing may change as we iterate.

Get historical "Token God Mode" (TGM) DEX trades (Beta)

post

Beta — subject to breaking changes.

Access historical DEX trading transactions for a specific token with temporally-correct trader labels. Labels are resolved at the trade date using label history tables to avoid forward-looking bias.

Key differences from /tgm/dex-trades:

  • Accepts an explicit date_range (no rolling default)

  • Labels resolved at the trade date, not the current state

  • No token_address / traded_token_address in the response

  • No only_smart_money flag — use filters.include_labels instead

Authorizations
apikeystringRequired

API key for authentication

Body

Request model for the historical DEX trades endpoint.

Returns individual DEX trades for a token with temporally-correct trader labels to prevent forward-looking bias. Uses label history tables instead of current-state label dictionaries.

chainstring · enumRequired

Blockchain chain

Example: ethereumPossible values:
token_addressstringRequired

Token contract address

Example: 0x6982508145454ce325ddbe47a25d4ec3d2311933
filtersany ofOptional

Optional filters applied server-side

order_byany ofOptional

Sort order. Defaults to block_timestamp DESC. Only the first element is used.

apply_blacklist_filterbooleanOptional

When True, exclude blacklisted addresses from the results. Defaults to True.

Default: trueExample: true
Responses
200

Historical TGM DEX trades data

application/json
post/api/v1beta1/tgm/historical-dex-trades
POST /api/v1beta1/tgm/historical-dex-trades HTTP/1.1
Host: api.nansen.ai
apikey: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 450

{
  "chain": "ethereum",
  "token_address": "0x6982508145454ce325ddbe47a25d4ec3d2311933",
  "date_range": {
    "from": "2025-06-01T00:00:00Z",
    "to": "2025-06-07T23:59:59Z"
  },
  "pagination": {
    "page": 1,
    "per_page": 10
  },
  "filters": {
    "action": "BUY",
    "include_labels": [
      "Whale",
      "Smart Trader"
    ],
    "value_usd": {
      "max": 100000,
      "min": 1000
    },
    "trader_address": "0x28c6c06298d514db089934071355e5743bf21d60"
  },
  "order_by": [
    {
      "field": "block_timestamp",
      "direction": "ASC"
    }
  ],
  "apply_blacklist_filter": true
}
{
  "data": [
    {
      "block_timestamp": "2025-06-01T12:00:00",
      "transaction_hash": "0x61adb6da30853c5988f0204dd9f6e4abbc878e02c34030a4f707cf4ec3124bcb",
      "trader_address": "0x28c6c06298d514db089934071355e5743bf21d60",
      "trader_address_label": "Smart Money",
      "action": "BUY",
      "token_name": "PEPE",
      "token_amount": 1000000,
      "traded_token_name": "WETH",
      "traded_token_amount": 0.5,
      "estimated_swap_price_usd": 0.000012,
      "estimated_value_usd": 12
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 10,
    "is_last_page": true
  }
}

Last updated

Was this helpful?