Skip to content

Top traders of a token by volume

$0.01 per callUSDC via x402POST /api/token-top-traders

Most active traders of a token by volume over a recent block window on Base or Ethereum...

Category: Crypto & onchain dataTags: crypto dex uniswap swaps traders wallets volume tokenAlso found as: token-traders token-active-wallets

Try in playground →

Details

Most active traders of a token by volume over a recent block window on Base or Ethereum, read from the token's Uniswap v2 and v3 pool Swap logs on chain. Each wallet (the sender of the swapping transaction, so router and aggregator swaps are credited to the signer) with its bought, sold and net amounts in the token and in USD, its trade and transaction counts, and its first and last block in the window. Rank by gross volume, net bought or net sold. Bounded reads: a capped window and transaction count, with a partial window flagged in fields. Amounts and counts only, not a rating or a recommendation.

Parameters

NameTypeRequiredDescription
tokenstringyesERC-20 token address (0x...). Also accepted as jwt, accessToken. The example sends 0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf.
networkstringnobase (default) or ethereum. The example sends base.
blocksnumbernoWindow length in blocks up to the head: base default 1800 (about an hour), at most 7200; ethereum default 300, at most 1200.
limitnumbernoWallets returned, 1-50 (default 20). The example sends 5.
rankstringnovolume (gross USD volume, default), bought (largest net buyers) or sold (largest net sellers).

Example request

curl -i -X POST https://agent402.tools/api/token-top-traders \
  -H "Content-Type: application/json" \
  -d '{"token":"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf","network":"base","limit":5}'

Watch a call get paid

RequestPOST /api/token-top-traders
402$0.01 USDC
SignPAYMENT-SIGNATURE
Settleon 14 chains
Answer200 OK
ReceiptAgent402-ReceiptEd25519

Example response

{
  "network": "base",
  "chainId": 8453,
  "token": {
    "address": "0xcbb7c0000ab88b473b1f5afd9ef808440eed33bf",
    "symbol": "cbBTC",
    "decimals": 8
  },
  "rank": "volume",
  "window": {
    "fromBlock": 63796100,
    "toBlock": 63797899,
    "blocks": 1800,
    "approxSeconds": 3600,
    "coveredFromBlock": 63796100,
    "coveredBlocks": 1800,
    "complete": true
  },
  "partial": false,
  "partialReasons": [],
  "pools": [
    {
      "address": "0xfbb6eed8e7aa03b138556eedaf5d271a5e1e43ef",
      "version": "v3",
      "fee": 500,
      "quote": "USDC"
    }
  ],
  "quotePricesUsd": {
    "USDC": 1,
    "WETH": 1651.42
  },
  "totals": {
    "swaps": 120,
    "transactions": 95,
    "traders": 30,
    "volumeUsd": 149025.4,
    "tokenVolume": 2.5
  },
  "traders": [
    {
      "address": "0x1a2b…9f0e",
      "volumeUsd": 24440.16,
      "boughtUsd": 12518.13,
      "soldUsd": 11922.03,
      "netUsd": 596.1,
      "boughtToken": 0.21,
      "soldToken": 0.2,
      "netToken": 0.01,
      "trades": 12,
      "transactions": 9,
      "firstSeenBlock": 63796210,
      "lastSeenBlock": 63797880
    }
  ],
  "returned": 5,
  "matched": 30,
  "complete": false,
  "truncated": true,
  "method": {
    "trader": "The trader is the sender (from) of the transaction that made the swap, read per transaction, so a swap routed through a router or aggregator is credited to the wallet that signed it. A contract that settles other wallets' orders in one transaction is credited as one trader.",
    "amounts": "Per swap, the token amount the pool paid out is bought and the amount it took in is sold; a transaction that swaps through two of the token's pools counts both legs. net = bought - sold.",
    "usd": "USD values are the quote side of each swap: stablecoin quotes at 1 USD, WETH at the reference WETH/USDC v3 pool's price at the window's last block (not at each swap's time).",
    "window": "The window is the last `blocks` blocks up to two blocks under the head. firstSeenBlock and lastSeenBlock are the wallet's first and last swap blocks inside the covered window.",
    "pools": "The token's Uniswap v3 pools (every fee tier) and v2 pair against each quote token listed in quotePricesUsd. Swaps on other venues are not read."
  },
  "reads": {
    "httpRequests": 4,
    "rpcCalls": 110,
    "rpcCallCeiling": 171
  },
  "source": "onchain",
  "fetchedAt": "2026-11-29T12:00:00.000Z"
}
FieldTypeAlways presentIn the example
networkstringyesbase
chainIdnumberyes8453
tokenobjectyes3 fields: address, symbol, decimals
rankstringyesvolume
windowobjectyes7 fields: fromBlock, toBlock, blocks, approxSeconds, coveredFromBlock and 2 more
partialbooleanyesfalse
partialReasonsarrayyes0 items in the example
poolsarray of objectsyes1 item in the example
quotePricesUsdobjectyes2 fields: USDC, WETH
totalsobjectyes5 fields: swaps, transactions, traders, volumeUsd, tokenVolume
tradersarray of objectsyes1 item in the example
returnednumberyes5
matchednumberyes30
completebooleanyesfalse
truncatedbooleanyestrue
methodobjectyes5 fields: trader, amounts, usd, window, pools
readsobjectyes3 fields: httpRequests, rpcCalls and 1 more
sourcestringyesonchain
fetchedAtstringyes2026-11-29T12:00:00.000Z

From an MCP client

catalog.call {
  "slug": "token-top-traders",
  "params": {
    "token": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
    "network": "base",
    "limit": 5
  }
}

Hosted connector (https://agent402.tools/mcp): paid in the call. Stdio package (npx -y agent402-mcp@0.18.0): pays from a wallet or an AGENT402_CREDITS_KEY issued earlier.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.01" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.AGENT_KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/token-top-traders", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "token": "0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf",
    "network": "base",
    "limit": 5
  }),
});

Get a wallet or run npx -y agent402-mcp@0.18.0 wallet new.

The quote (Python)

import base64, json, urllib.error, urllib.request

req = urllib.request.Request("https://agent402.tools/api/token-top-traders", method="POST", data="{\"token\":\"0xcbB7C0000aB88B473b1f5aFd9ef808440eed33Bf\",\"network\":\"base\",\"limit\":5}".encode(), headers={"Content-Type": "application/json"})
try:
    urllib.request.urlopen(req)
except urllib.error.HTTPError as e:
    quote = json.loads(base64.b64decode(e.headers["PAYMENT-REQUIRED"]))
    print(e.code, [(a["network"], a["amount"]) for a in quote["accepts"]])  # the price, per chain, in base units

Related tools