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.

GET/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>"
Parameters
ParameterDescription
chain

path · string · required

The chain the token lives on. ETH only; every other chain returns 400.
mint

path · 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.

Response fields of Who made the most on this token, all time, held tokens included?
FieldTypeDescription
asOfBlockinteger | nullThe block the ranking was computed up to.
leadersobject[]Highest totalPnlUsd first. At most 100.
leaders[].walletstringLowercase.
leaders[].totalPnlUsdnumber | nullRealized plus unrealized profit, USD. What the list is ranked by.
leaders[].totalPnlPctnumber | nulltotalPnlUsd as a percentage of the USD spent buying.
leaders[].realizedPnlUsdnumber | nullProfit on tokens already sold, USD. A real 0 when the wallet sold nothing.
leaders[].realizedPnlPctnumber | nullRealized profit as a percentage of the cost of the tokens sold; null when the wallet sold nothing.
leaders[].unrealizedPnlUsdnumber | nullMark-to-market profit on the tokens still held, USD.
leaders[].tokensBoughtnumber | nullWhole tokens bought.
leaders[].tokensSoldnumber | nullWhole tokens sold.
leaders[].boughtUsdnumber | nullUSD spent buying.
leaders[].soldUsdnumber | nullUSD received selling.
leaders[].avgBuyPriceUsdnumber | nullnull when the wallet bought nothing.
leaders[].avgSellPriceUsdnumber | nullnull when the wallet sold nothing.
leaders[].costOfSoldUsdnumber | nullThe cost of the tokens sold, at the average buy price; null when the wallet sold nothing.
leaders[].tradesinteger | nullBuys and sells together.
truncatedbooleantrue 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