Tokens API
Who made the most on this token, all time, held tokens included?
Up to 100 wallets ranked by all-time total profit on a token, realized plus unrealized, with what each bought and sold, average prices and trade count.
/api/external/token-analysis/token-pnl-leaders/{chain}/{mint}What it returns
Up to 100 wallets ranked by TOTAL profit on the token since they first traded it: profit already taken on tokens sold plus the mark-to-market profit on tokens still held, highest first. Tokens a wallet sold without having bought them here are costed at its average buy price. truncated means more wallets are ranked than the ones listed. An empty leaders means no ranking exists for the token, which is the case for stablecoins. An address that is not a known token returns 404.
Chains
- Ethereum ETH
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-pnl-leaders/ETH/<mint>"
| Parameter | Description |
|---|---|
chainpath · string · required | The chain the token lives on. ETH only; 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 |
|---|---|---|
asOfBlock | integer | null | The block the ranking was computed up to. |
leaders | object[] | Highest totalPnlUsd first. At most 100. |
leaders[].wallet | string | Lowercase. |
leaders[].totalPnlUsd | number | null | Realized plus unrealized profit, USD. What the list is ranked by. |
leaders[].totalPnlPct | number | null | totalPnlUsd as a percentage of the USD spent buying. |
leaders[].realizedPnlUsd | number | null | Profit on tokens already sold, USD. A real 0 when the wallet sold nothing. |
leaders[].realizedPnlPct | number | null | Realized profit as a percentage of the cost of the tokens sold; null when the wallet sold nothing. |
leaders[].unrealizedPnlUsd | number | null | Mark-to-market profit on the tokens still held, USD. |
leaders[].tokensBought | number | null | Whole tokens bought. |
leaders[].tokensSold | number | null | Whole tokens sold. |
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. |
leaders[].costOfSoldUsd | number | null | The cost of the tokens sold, at the average buy price; null when the wallet sold nothing. |
leaders[].trades | integer | null | Buys and sells together. |
truncated | boolean | true when more wallets are ranked than the ones listed. |
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