Returns
Arguments
Example
Test this query in the Explorer →EVM networks with traces enabled:Ethereum
BNB Chain (BSC)
Unichain
Polygon
Base
Story
Meld
Yominet
Ham
Berachain
Avalanche
Sanko
Arbitrum
Superposition
Optimism
Abstract
Monad
Balances are also unavailable on Sui (Network 101).
Usage Guidelines
- Use
walletAddresswith the wallet address (ENS names are not supported) - Specify
networksarray to filter balances to specific chains (e.g.,[1]for Ethereum) - Use
tokensarray to request specific token balances (max 200 tokens) - Use
removeScams: trueto filter out likely scam and dust tokens. This removes tokens we’ve manually flagged (isScam: true), and for unlabeled tokens it applies a lightweight heuristic that drops ones with no recent trading activity and negligible liquidity. See the troubleshooting note below for the details and caveats. - Read
liquidityUsdfor the token’s route-backed liquidity in USD — the real liquidity supporting its price, summed across the token’s pairs with valid routing liquidity (null when not yet computed). This replaces the older reserves-times-price measure, so it reflects liquidity a holder could actually trade against. Combine it withtokenLastTradedTimestampto value a portfolio accurately: discount or exclude holdings with negligible liquidity or no recent trades so illiquid or dead tokens don’t inflate a wallet’s total. - Use
updatedAtBlockto see the block at which a balance was last updated (null for native balances or when the block is unknown), for balance-freshness provenance. - Use the
cursorparameter for pagination through large token holdings - Balances are current-state only — Codex does not store historical balances, so there is no way to query a wallet’s holdings as of a past block or timestamp. See the FAQ for the recommended approach to reconstructing historical portfolio value
Troubleshooting Tips
Why are native balances not showing?
Why are native balances not showing?
Why is balanceUsd returning null?
Why is balanceUsd returning null?
balanceUsd may be null if we don’t have price data for that token. This can happen with very new or low-liquidity tokens. The raw balance and shiftedBalance fields will still be available.How do I get an accurate portfolio value?
How do I get an accurate portfolio value?
balanceUsd values each holding at the current token price, but a price alone can make illiquid or dead tokens look valuable. Use liquidityUsd — the token’s route-backed liquidity in USD, i.e. the real liquidity supporting its price across pairs with valid routing — together with tokenLastTradedTimestamp to filter or discount holdings that couldn’t actually be sold at their quoted price. A common approach is to drop or down-weight tokens below a liquidity threshold, or with no trades in the last day, before summing balanceUsd into a portfolio total, so a handful of worthless tokens don’t make a wallet look far richer than it is.How do I get balances for specific tokens only?
How do I get balances for specific tokens only?
tokens parameter with an array of token IDs (address:networkId) or addresses. When using addresses only, you must also provide the networks parameter. Max 200 tokens per request.Can I query multiple wallets at once?
Can I query multiple wallets at once?
balances queries a single wallet. To get balances for multiple wallets, make separate requests for each wallet address.Why am I seeing scam or unrecognized tokens?
Why am I seeing scam or unrecognized tokens?
removeScams: true may filter some of these out, but it will not catch everything. It does two things. First, it removes tokens we’ve manually flagged as a scam (isScam: true), which we do sparingly. Second, for tokens we haven’t labeled, it applies a lightweight heuristic that drops ones with no trading activity in the last 24 hours and negligible liquidity. If those activity and liquidity metrics aren’t readily available for a token at query time, we keep it rather than risk hiding a real holding, so plenty of low-quality tokens may still need client-side filtering.We intentionally keep this filtering conservative. Many tokens may look like scams, or may become scams, but can still be sellable by a user. If we hid them too aggressively, a user could lose the ability to see and sell a token that was flagged in error. For stricter filtering we recommend filtering client-side on metrics such as liquidity.How quickly are balances updated after a transaction?
How quickly are balances updated after a transaction?
Related Recipes
- Wallets: Analyze wallet performance, discover top traders, and build portfolio views