Functions
- Latest
- Historical
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.| Parameter | Type | Description |
|---|---|---|
p_chain_id | STRING | Chain the token is deployed on, for example ethereum. |
p_token_address | STRING | Contract 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_type | STRING | Token standard: erc20, spl or trc20. |
| Return column | Type | Description |
|---|---|---|
account_address | STRING | Account holding a positive balance: a wallet on the log-shaped chains, an SPL token account on Solana. |
balance | BIGNUMERIC | Latest 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
- Current holders
- Holders on a date
- Holder concentration
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.