# Nansen TGM DEX Trades

> Nansen TGM DEX Trades is a paid API for AI agents from Nansen at api.nansen.ai, paid per call via MPP, $0.01/call, status unknown (last checked 2026-10-09).

Retrieves individual DEX trade transactions for a specific token on a given chain, including trader addresses, labels, amounts, prices, and trade direction (buy/sell).

## Facts

- Endpoint: POST https://api.nansen.ai/api/v1/tgm/dex-trades?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-09
- Activations on Zero: 0
- Provider: Nansen
- Docs: https://docs.nansen.ai
- Website: https://nansen.ai
- Tags: blockchain, smart-money, wallet, tokens, defi, analytics, profiler, dex, pnl, onchain, prediction-market, data
- Canonical page: https://www.zero.xyz/c/nansen-dex-trades-d82c32ba
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_ojUGVsk2zYpN_1Qq6eK5_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability nansen-dex-trades-d82c32ba -d '<json body>'
```

Example prompt: Pull all DEX trades for token 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on Ethereum between January 1, 2025 and January 31, 2025, and show me only BUY transactions worth at least $1,000 USD — I want to see each trader's address, how much they bought, and the transaction hash.

## When to prefer this

Use this endpoint when you need granular, trade-by-trade DEX transaction data for a specific token — including individual trader addresses, exact amounts, and timestamps — rather than aggregated summaries. Prefer this over the 'Who Bought Sold' endpoint when you need transaction-level detail rather than aggregated volume. Ideal for forensic analysis, tracking specific wallets, or building trade history timelines.

## Known failure modes

- Missing required fields (chain, token_address, date) returns 400 validation error
- Invalid chain enum value returns 400 error
- Invalid date format returns 400 error
- Token address not found on specified chain returns empty data array
- Date range too large may result in truncated or paginated results
- Malformed numeric range filter (min > max) returns 400 error
- Payment not provided or insufficient returns 402 payment required

## How this service works

Access individual DEX trading transactions for a specific token. Shows detailed trade-by-trade data including trader labels, amounts, and prices.

## Output

Returns a paginated list of individual DEX trade records, each containing the transaction hash, block timestamp, trader address, buy/sell action, token name and amount, the counter-token name and amount, estimated swap price in USD, estimated total value in USD, and optional trader labels. Pagination metadata is also included.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "TGMDexTradesRequest",
 "required": [
  "chain",
  "token_address",
  "date"
 ],
 "properties": {
  "date": {
   "type": "object",
   "title": "DateRange",
   "properties": {
    "to": {
     "anyOf": [
      {
       "type": "string"
      }
     ],
     "title": "To",
     "examples": [
      "2025-01-31T23:59:59Z"
     ],
     "description": "End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"
    },
    "from": {
     "anyOf": [
      {
       "type": "string"
      }
     ],
     "title": "From",
     "examples": [
      "2025-01-01T00:00:00Z"
     ],
     "description": "Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"
    }
   },
   "description": "Date range model matching the API schema."
  },
  "chain": {
   "enum": [
    "arbitrum",
    "arc",
    "avalanche",
    "base",
    "bnb",
    "ethereum",
    "hyperevm",
    "hyperliquid",
    "injective",
    "iotaevm",
    "linea",
    "mantle",
    "mantra",
    "monad",
    "near",
    "optimism",
    "plasma",
    "polygon",
    "robinhood",
    "sei",
    "solana",
    "sonic",
    "starknet",
    "sui",
    "ton",
    "tron"
   ],
   "type": "string",
   "title": "TGMChain",
   "description": "Chains supported in TGM (Token God Mode) endpoints."
  },
  "filters": {
   "anyOf": [
    {
     "type": "object",
     "title": "TGMDexTradesFilters",
     "properties": {
      "action": {
       "anyOf": [
        {
         "enum": [
          "BUY",
          "SELL"
         ],
         "type": "string",
         "title": "TGMWhoBoughtSoldType",
         "description": "TGM who bought/sold type."
        }
       ],
       "examples": [
        "BUY",
        "SELL"
       ],
       "description": "Action filter (BUY/SELL)"
      },
      "token_name": {
       "anyOf": [
        {
         "type": "string"
        }
       ],
       "title": "Token Name",
       "examples": [
        "USDC",
        "%Uniswap%"
       ],
       "description": "Token name filter"
      },
      "token_amount": {
       "anyOf": [
        {
         "type": "object",
         "title": "NumericRangeFilter",
         "properties": {
          "max": {
           "anyOf": [
            {
             "type": "number"
            }
           ],
           "title": "Max",
           "examples": [
            50000,
            10000000,
            100
           ],
           "description": "Maximum value (inclusive)"
          },
          "min"
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "TGMDexTradesResponse",
 "required": [
  "data",
  "pagination"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "TGMDexTrade",
    "required": [
     "block_timestamp",
     "transaction_hash",
     "trader_address",
     "action",
     "token_address",
     "token_name",
     "token_amount",
     "traded_token_address",
     "traded_token_name",
     "traded_token_amount",
     "estimated_swap_price_usd",
     "estimated_value_usd"
    ],
    "properties": {
     "action": {
      "enum": [
       "BUY",
       "SELL"
      ],
      "type": "string",
      "title": "TGMWhoBoughtSoldType",
      "description": "TGM who bought/sold type."
     },
     "token_name": {
      "type": "string",
      "title": "Token Name",
      "examples": [
       "USDC"
      ],
      "description": "The name of the token"
     },
     "token_amount": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Token Amount",
      "examples": [
       1000
      ],
      "description": "The amount of the specified token traded"
     },
     "token_address": {
      "type": "string",
      "title": "Token Address",
      "examples": [
       "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
      ],
      "description": "Address of token"
     },
     "trader_address": {
      "type": "string",
      "title": "Trader Address",
      "examples": [
       "0x28c6c06298d514db089934071355e5743bf21d60"
      ],
      "description": "Trader's address"
     },
     "block_timestamp": {
      "type": "string",
      "title": "Block Timestamp",
      "examples": [
       "2025-05-01T12:00:00Z"
      ],
      "description": "Block timestamp of the trade"
     },
     "transaction_hash": {
      "type": "string",
      "title": "Transaction Hash",
      "examples": [
       "0x61adb6da30853c5988f0204dd9f6e4abbc878e02c34030a4f707cf4ec3124bcb"
      ],
      "description": "Transaction hash"
     },
     "traded_token_name": {
      "type": "string",
      "title": "Traded Token Name",
      "examples": [
       "DAI"
      ],
      "description": "The name of the token traded for the specified token"
     },
     "estimated_value_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Estimated Value Usd",
      "examples": [
       1500.5
      ],
      "description": "The estimated value of the trade in USD"
     },
     "traded_token_amount": 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nansen-dex-trades-d82c32ba/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.nansen.ai](https://www.zero.xyz/host/api.nansen.ai/llms.txt)
