🚀 Stablecoin Accounts are live! Learn more
import { useMultichainTokenBalances } from "@dynamic-labs/sdk-react-core"; const { multichainTokenBalances, isLoading, isError, error } = useMultichainTokenBalances({ requests: [ { "chain": ChainEnum.Evm, "address": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0", "networkIds": [1] // network IDs for enabled EVM networks }, { "chain": ChainEnum.Sol, // use this for SVM networks (including eclipse) "address": "CKEAuq1E7hUcrjDcu1xP6nax3YBvEhhq7qaCzDUkPNer", "networkIds": [101] }, { "chain": ChainEnum.Btc, "address": "bc1pynfpvf0lghwu9l3u07fwhsu5093jwyjrlqax0r53z8mqe8ed4q5qfcs9t7", "networkIds": [1] // we only support balances on BTC mainnet so please use 1 for the network ID } ] });
Response structure: [ { "chain": "EVM", "networks": [ { "networkId": 1, "balances": [ { "address": "0x9de16c805a3227b9b92e39a446f9d56cf59fe640", "balance": 7877386.999999999, "decimals": 18, "id": null, "isNative": false, "liquidityPoolSizeUsd": 35339.2792275625, "logoURI": "https://api.dune.com/api/echo/beta/token/logo/8453/0x9de16c805a3227b9b92e39a446f9d56cf59fe640", "marketValue": 0.053820792951712056, "name": "Bento", "networkId": 8453, "price": 6.832315455837331e-9, "rawBalance": 7.877387e+24, "symbol": "BENTO" }, ... ] } ], "walletAddress": "0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0" } ]
Was this page helpful?