# Nansen Who Bought Sold

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

Returns aggregated buy/sell trade volumes in USD for wallet addresses trading a specific token within a given time range, enabling identification of net buyers and sellers.

## Facts

- Endpoint: POST https://api.nansen.ai/api/v1/tgm/who-bought-sold?utm_source=zero.xyz
- Price: $0.01/call
- Payment: MPP, x402
- 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-who-bought-sold-adf54581
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rP-GTBPfbirEI89TIpRon

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-who-bought-sold-adf54581 -d '<json body>'
```

Example prompt: Who are the top net buyers of the token at address 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 on Ethereum between January 1 and January 31 2025, with a minimum bought volume of $10,000 USD?

## When to prefer this

Use this endpoint when you need to identify who is buying or selling a specific token, rank wallets by trade volume, or detect accumulation/distribution patterns. Prefer over generic token analytics when you need per-wallet buy/sell breakdown with USD values. Best for smart money flow analysis, whale tracking, and identifying net buyers vs sellers of a token in a defined time window across any of the 25+ supported chains.

## Known failure modes

- Missing required fields (chain, token_address, date) returns 400 validation error
- Invalid chain enum value returns 400 with list of supported chains
- Token address not found or not tracked on the specified chain returns empty data array
- Date range too broad may time out or return partial results
- Invalid ISO 8601 date format returns 400 parse error
- Insufficient API credits or unauthorized access returns 402 or 401
- Pagination page exceeding available records returns empty data with is_last_page=true

## How this service works

This endpoint provides an aggregated summary of trade volumes in USD for addresses. It can be used to identify addresses that are net buyers or sellers of a token within a time period.

## Output

Returns a paginated list of wallet addresses with their aggregated bought volume in USD, sold volume in USD, net trade volume in USD, and corresponding token volumes for the specified token and time period. Each record may include an address label (e.g. 'High Gas Consumer') if Nansen has classified the wallet. Pagination metadata indicates current page and whether more results exist.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "title": "TGMWhoBoughtSoldRequest",
 "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": "TGMWhoBoughtSoldFilters",
     "properties": {
      "address": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        {
         "type": "null"
        }
       ],
       "title": "Address",
       "examples": [
        "0x28c6c06298d514db089934071355e5743bf21d60"
       ],
       "description": "Trader address filter"
      },
      "address_label": {
       "anyOf": [
        {
         "type": "string"
        },
        {
         "type": "array",
         "items": {
          "type": "string"
         }
        },
        {
         "type": "null"
        }
       ],
       "title": "Address Label",
       "examples": [
        "High Gas Consumer"
       ],
       "description": "Trader label filter"
      },
      "sold_volume_usd": {
       "anyOf": [
        {
         "type": "object",
         "title": "NumericRangeFilter",
         "properties": {
          "max": {
           "anyOf": [
            {
             "type": "number"
            }
           ],
      
… (truncated)
```

## Response schema (JSON Schema)

```json
{
 "type": "object",
 "title": "TGMWhoBoughtSoldResponse",
 "required": [
  "data",
  "pagination"
 ],
 "properties": {
  "data": {
   "type": "array",
   "items": {
    "type": "object",
    "title": "TGMWhoBoughtSold",
    "required": [
     "address"
    ],
    "properties": {
     "address": {
      "type": "string",
      "title": "Address",
      "examples": [
       "0x1234567890123456789012345678901234567890"
      ],
      "description": "The address that did the trades"
     },
     "address_label": {
      "anyOf": [
       {
        "type": "string"
       }
      ],
      "title": "Address Label",
      "examples": [
       "High Gas Consumer"
      ],
      "description": "Label associated with the address"
     },
     "sold_volume_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Sold Volume Usd",
      "examples": [
       12500
      ],
      "description": "The aggregate sold volume in USD for the address"
     },
     "trade_volume_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Trade Volume Usd",
      "examples": [
       12500
      ],
      "description": "The net trade volume in USD for the address"
     },
     "bought_volume_usd": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Bought Volume Usd",
      "examples": [
       25000
      ],
      "description": "The aggregate bought volume in USD for the address"
     },
     "sold_token_volume": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Sold Token Volume",
      "examples": [
       500.25
      ],
      "description": "The aggregate sold token volume for the address"
     },
     "token_trade_volume": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Token Trade Volume",
      "examples": [
       500.25
      ],
      "description": "The net token trade volume for the address"
     },
     "bought_token_volume": {
      "anyOf": [
       {
        "type": "number"
       }
      ],
      "title": "Bought Token Volume",
      "examples": [
       1000.5
      ],
      "description": "The aggregate bought token volume for the address"
     }
    },
    "description": "Individual TGM who bought/sold record.\n\nRepresents a single address with aggregated trade volumes."
   },
   "title": "Data",
   "description": "List of TGM who bought/sold records"
  },
  "pagination": {
   "
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/nansen-who-bought-sold-adf54581/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)
