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.

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

path · string · required

The chain the token lives on. SOL or BASE; 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 took the most profit on this token over its whole life?
FieldTypeDescription
leadersobject[]Highest realizedPnlUsd first. At most 50.
leaders[].walletstringThe wallet; lowercase on BASE.
leaders[].realizedPnlUsdnumber | nullProfit 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[].buysinteger | nullBuy trades.
leaders[].sellsinteger | nullSell trades.
leaders[].tokensBoughtnumber | nullWhole tokens bought.
leaders[].tokensSoldnumber | nullWhole tokens sold.
leaders[].tokensSoldWithoutBuyingnumber | nullWhole tokens sold beyond the ones bought, so sold at no cost; 0 when every token sold was bought.
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.

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