Token balance are currently supported on: Ethereum, Worldchain, Shape, Zksync, Optimism, Polygon, Geist, Arbitrum, Blast, Linea, Base, Scroll, Gnosis, BNB, Avalanche, Apechain, Lens, Soneium, Rootstock, Abstract, Settlus, Ink, Solana, Bitcoin runes.Dynamic supports fetching the top 3000 tokens by market cap.
Hook
You can fetch token balances for a user’s wallet using theuseTokenBalances hook:
React
Return Value
This hook returns an object fortokenBalances with the following properties:
| Property | Type | Description |
|---|---|---|
| networkId | integer | The network ID of the token i.e. 1 for Ethereum, 137 for Polygon, etc. |
| address | string | The address of the token. |
| name | string | The name of the token. |
| symbol | string | The symbol of the token. |
| decimals | integer | The number of decimals the token has. |
| logoURI | string | The URI of the token’s logo image. |
| balance | float | The balance of the token in the user’s wallet. |
| rawBalance | integer | The raw balance of the token in the user’s wallet. |
| rawBalanceString | string | The raw balance encoded as a base-10 string. Use this when the balance exceeds Number.MAX_SAFE_INTEGER (>= 2^53) to avoid precision loss — e.g. for high-decimal tokens or pre-divisor wei amounts. |
Reference
You can find the full reference for theuseTokenBalances hook here.
On chains that distinguish a public balance from a private (shielded) one — Aleo today — use the
usePrivateTokenBalances hook to render the private balances. It mirrors useTokenBalances and can be called alongside it.Full Example
React
Using the JavaScript SDK? See Getting Multichain Token Balances for the equivalent guide.