Skip to main content
Build a wallet’s portfolio view from one Assets API request. Holdings returns XLM, every trustline, liquidity pool shares and recognized contract tokens, each with its balance, spendable amount and token metadata. Set these once in your terminal. The sample values are real Testnet data, so the read examples return real results.
This recipe uses a Testnet wallet that holds several assets:

Fetch the portfolio

Output for the sample wallet (8 holdings, trimmed):
One holding record, trimmed:

Read the result

Add kind=trustline (or native, pool_share, contract) to show one kind, or min_balance=0.01 to hide dust. Several classic assets can share a code such as USDC; show the issuer or the token’s home domain next to the code so users can tell them apart.

Credits

On Mainnet, holdings cost 1 credit per started 100 records, so a wallet with up to 100 holdings costs 1 credit (plus 1 per token simulated with include=unverified). On Testnet the request is free and counts toward the daily Testnet cap of 10,000. See Limits and credits.

Next