Tokens API
Who took the most profit on this token over its whole life?
Up to 50 wallets ranked by lifetime realized profit on a token, with buys, sells, USD in and out, average prices and tokens sold without buying. SOL and BASE.
/api/external/token-analysis/token-realized-pnl-leaders/{chain}/{mint}What it returns
Up to 50 wallets ranked by REALIZED profit on the token since they first traded it — profit already taken by selling, highest first — with their buys, sells, amounts, USD in and out and average prices. Tokens sold beyond the ones bought were received some other way (transfer, airdrop, allocation) and count as sold at no cost: tokensSoldWithoutBuying shows how much of a profit comes from them, and a wallet with 0 buys realizes its whole sale proceeds. Tokens still held are not valued here. 404 means no ranking exists for the token, which is also the case for some large and stable tokens. The first ask for a token can take up to ~30 s or fail while the ranking is computed; asking again then answers fast.
Chains
- Solana SOL
- Base BASE
Request
Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.
curl -H "x-dex-data-key: $DEXDATA_API_KEY" \ "https://api.dexdata.io/api/external/token-analysis/token-realized-pnl-leaders/SOL/<mint>"
| Parameter | Description |
|---|---|
chainpath · string · required | The chain the token lives on. SOL or BASE; every other chain returns 400. |
mintpath · string · required | The token mint address (Solana) or contract address (EVM). |
Response fields
A JSON response. Every field is always present; null means the value could not be established, never zero.
| Field | Type | Description |
|---|---|---|
leaders | object[] | Highest realizedPnlUsd first. At most 50. |
leaders[].wallet | string | The wallet; lowercase on BASE. |
leaders[].realizedPnlUsd | number | null | Profit on the tokens sold, USD: USD received minus the average buy price times the tokens sold that were bought. What the list is ranked by. |
leaders[].buys | integer | null | Buy trades. |
leaders[].sells | integer | null | Sell trades. |
leaders[].tokensBought | number | null | Whole tokens bought. |
leaders[].tokensSold | number | null | Whole tokens sold. |
leaders[].tokensSoldWithoutBuying | number | null | Whole tokens sold beyond the ones bought, so sold at no cost; 0 when every token sold was bought. |
leaders[].boughtUsd | number | null | USD spent buying. |
leaders[].soldUsd | number | null | USD received selling. |
leaders[].avgBuyPriceUsd | number | null | null when the wallet bought nothing. |
leaders[].avgSellPriceUsd | number | null | null when the wallet sold nothing. |
Start building with DexData today
Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.
Get a free API key