Skip to main content
Holder balances are computed at query time from Transfers: every movement splits into its debit and its credit leg, and the legs add up per account. Each function takes a chain, a token address and a token standard, and reads that token’s whole movement history.

Functions

functions.calculate_latest_token_balances returns the current holders of one token: each account’s most recent end-of-day balance, kept where it is positive. Picking the most recent row first and applying the positive filter second is what makes the result the holder set today.
ParameterTypeDescription
p_chain_idSTRINGChain the token is deployed on, for example ethereum.
p_token_addressSTRINGContract address of the token. An erc20 address is lowercased for you, so a checksummed address copied from an explorer resolves; every other standard is matched as the chain writes it, spl and trc20 being base58.
p_token_typeSTRINGToken standard: erc20, spl or trc20.
Return columnTypeDescription
account_addressSTRINGAccount holding a positive balance: a wallet on the log-shaped chains, an SPL token account on Solana.
balanceBIGNUMERICLatest end-of-day balance in token units. Added up in exact whole-number arithmetic and scaled by the token’s decimals, so a drained account reads exactly zero and leaves the holder set.

Sample queries

Each call adds up the token’s whole movement history, so a one-off holder set costs a full scan. Assets ▸ Metrics holds a daily supply and holder-count series for curated assets.