Privy supports fetching wallet balances by wallet ID. Balances can be queried for named assets (e.g. replacing Fetch USDT on Tron mainnet:Fetch a custom TRC-20 token by contract address:
eth, ousd) or custom assets by contract address.To do so, make a GET request to<wallet_id> with the ID of your desired wallet.Query parameters
string | string[]
Named asset(s) to query (e.g.
eth, ousd). Use together with chain. Cannot be used with token.Supported values: usdc, usdc_e, eth, avax, pol, bnb, usdt, eurc, usdb, ousd, pathusd, sol, trxNot every asset is deployed on every chain. If an asset has no canonical deployment on the
requested chain, the request fails with a <asset> not supported on <chain> error — query that
token by contract address with the token parameter instead.string | string[]
Chain(s) to query named assets on. Use together with
asset. Cannot be used with token.Supported mainnets: ethereum, arbitrum, avalanche, base, bsc, hypercore, hyperevm, ink, linea, megaeth, optimism, polygon, robinhood, solana, soneium, tempo, tron, unichain, worldchain, zksync_eraSupported testnets: arbitrum_sepolia, avalanche_fuji, base_sepolia, bsc_testnet, hoodi, ink_sepolia, linea_testnet, optimism_sepolia, polygon_amoy, robinhood_testnet, sepolia, solana_devnet, solana_testnet, tempo_testnet, tron_nilestring | string[]
Token contract address(es) in
chain:address format. Use this to query balances for arbitrary ERC-20 or SPL tokens.- EVM example:
base:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 - Solana example:
solana:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v - Tron example:
tron:TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t
asset/chain or include_currency. Up to 10 tokens per request.string
Convert balances to a fiat currency. Supported values:
usd, eur. Not supported when token is
provided.Examples
Named assets
Fetch a named asset balance usingasset and chain:Custom tokens
Fetch the balance of an arbitrary token by contract address using thetoken parameter:Tron (TRX and TRC-20)
Fetch TRX balance on Tron mainnet:Use
chain=tron_nile for the Tron Nile testnet. Supported named Tron assets: trx, usdt,
usdc. All Tron assets use 6 decimal places.
