Multi-chain wallets
Show balances and activity
Load a multi-chain portfolio and per-chain transaction history for the addresses in a wallet.
Load a multi-chain portfolio
From your backend, request balances for one address across several chains. Pass up to 20 chain IDs per request. Because EVM chains share an address, one call covers all of them; call again with the Solana or Bitcoin address for those chains.
curl -sS "https://blockchain.gray3.io/v1/portfolio/multi?address=0xYourAddress&chainIds=ethereum,base,polygon" \
-H "X-Gray-Project-Id: $GRAY_PROJECT_ID" \
-H "Authorization: Bearer $GRAY_SECRET_KEY"Each entry in chains has either a portfolio or an error, so one slow chain never fails the whole request. Balances are base-unit integer strings; divide by 10 ** decimals for display. On mainnet, assets often include priceUsd and balanceUsd.
Load activity
Activity is per chain. Call GET /v1/activity once for each chain you display, and pass nextCursor from the previous page to load older items.
curl -sS "https://blockchain.gray3.io/v1/activity?chainId=ethereum&address=0xYourAddress" \
-H "X-Gray-Project-Id: $GRAY_PROJECT_ID" \
-H "Authorization: Bearer $GRAY_SECRET_KEY"Prices and NFTs
For fresh prices, use POST /v1/prices/multi with up to 50 tokens. To show collectibles, call GET /v1/nfts once per chain. Both are mainnet-only.