Skip to main content
This endpoint requires a Growth or Enterprise plan. Learn more.

Returns

BalancesResponse!
See BalancesResponse

Arguments

BalancesInput!
required
See BalancesInput

Example

Test this query in the Explorer →
Native balances (ETH, BNB, and so on) are returned on EVM networks alongside token balances. Codex reads a wallet’s native balance from the chain each time the wallet appears in a transaction. Native tokens a wallet receives from a contract, with no transaction of its own (for example a refund or an unwrap), can show up only after the wallet’s next transaction. Check updatedAtBlock to see when a balance was last read.Balances are unavailable on Sui (Network 101).

Usage Guidelines

  • Use walletAddress with the wallet address (ENS names are not supported)
  • Specify networks array to filter balances to specific chains (e.g., [1] for Ethereum)
  • Use tokens array to request specific token balances (max 200 tokens)
  • Use removeScams: true to remove tokens we’ve manually labelled as scams (isScam: true). Unlabelled tokens are always kept, so it won’t remove most junk airdrops. See the troubleshooting note below.
  • Use filters (BalanceFilters) to keep only holdings in a balanceUsd or liquidityUsd range, or with or without a price (hasPrice). For example, filters: { liquidityUsd: { gt: 1000 } } drops tokens with almost no liquidity.
    • balanceUsd requires sortBy: USD_VALUE unless you pass tokens.
    • A filtered page reads at most 600 of the wallet’s holdings, so it can return fewer than limit results, or none, while cursor is still set. Keep paging until cursor is null, and reuse a cursor only with the same filters.
    • Unpriced tokens often have balanceUsd of "0" rather than null, so balanceUsd: { gte: 0 } keeps them. Use gt: 0 or hasPrice: true to drop them.
    • Native balances always match a liquidityUsd range.
    • Filters are not a scam filter: junk tokens with real-looking liquidity still pass.
  • Read liquidityUsd for 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 with tokenLastTradedTimestamp to 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 updatedAtBlock to see the block at which a balance was last updated (null when the block is unknown), for balance-freshness provenance.
  • Rebasing tokens change holder balances without a Transfer event, so their balances here can drift from the token’s own balanceOf.
  • limit defaults to 200 and cannot exceed 200. Use the cursor parameter to page through larger 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

Codex reads the native balance from the chain each time the wallet appears in a transaction. Native tokens received from a contract without a transaction by the wallet (for example a refund or an unwrap) are picked up on the wallet’s next transaction. Check updatedAtBlock, and use the network’s RPC (eth_getBalance) if you need the balance at the latest block.
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.
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.
Use the 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.
No, balances queries a single wallet. To get balances for multiple wallets, make separate requests for each wallet address.
Wallets accumulate scam and junk tokens over time, often as unsolicited airdrops. Setting removeScams: true removes only tokens we’ve manually labelled as a scam (isScam: true), which we do sparingly. Unlabelled tokens are always kept, so most junk will still come through. To drop more, add filters, such as a liquidityUsd minimum or hasPrice: true, or filter client-side.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, use filters or filter client-side on metrics such as liquidity.
Under normal conditions, balances typically reflect a new transaction within a second or two after it finalizes. This is a general expectation rather than a guaranteed number, and we don’t currently publish a formal standard or SLA for it.Timing varies by network. Solana is the most common network for this query, where updates generally land within about 2 seconds of confirmation. Other networks may take longer. Response times can also be slower during periods of heavy balances indexing.Our team is alerted to balance delays and addresses them promptly. If you consistently see delays beyond a few seconds (for example, more than 5 seconds on Solana), reach out to support.
  • Wallets: Analyze wallet performance, discover top traders, and build portfolio views
Last modified on November 4, 2026