Tokens API

Total supply at a past block

How many units of the token existed at a caller-chosen past block height — the historical sibling of the current-total-supply lookup.

GET/api/external/token-analysis/supply-history/{chain}/{mint}

What it returns

The token's RAW, undecimalized total supply at a caller-chosen past block — apply the token's own decimals (from metadata) to read it in human units. A DIFFERENT question from supply, which reports the CURRENT total read fresh off the live contract and cannot answer a past block at all. null means nothing was reported for that block — including a block number that has not been mined yet, or does not exist on this chain.

Chains

  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • 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/supply-history/BNB/<mint>?blockNumber=<blockNumber>"
Parameters
ParameterDescription
blockNumber

query · integer · required

The block height to check total supply at.
chain

path · string · required

Ethereum, BNB, Base or Stable — the four chains the wired source indexes. Every other chain returns 400.
mint

path · string · required

The token contract address.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of Total supply at a past block
FieldTypeDescription
totalRawstring | nullRaw base-unit supply at that block, as a decimal string — apply the token's own decimals. A "0" means the token existed and held no supply at that block, which is also the honest answer for a block BEFORE the token was deployed; an address that never held a token at all is a 404, not a "0". null means the source had nothing for that block.

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