Skip to main content
Holdings lists everything one address holds: XLM, trustlines, liquidity pool shares, and SAC and custom-token balances held in contract storage, including archived ones. Use it for a wallet portfolio or to check what an address can spend right now. Set these once in your terminal. The sample values are real Testnet data, so the read examples return real results.
The sample ACCOUNT holds only XLM, so this page uses a Testnet DEX trader with three trustlines and open offers:
Trimmed live response (2 of 4 records):

Ordering

Records are sorted by asset ID in byte order (uppercase codes before native, so CETES:..., USDC:..., then native). Follow _links.next.href for the next page; it is absent on the last page.

Record fields

Null rules

A field in the table that does not apply to the record is null. Fields outside the table appear only when they apply: closed_ledger and last_balance on records (with include=closed), and muxed_input on the response when you asked with a muxed M... address.
  • XLM has issuer, limit, authorized, maintain_liabilities and clawback set to null.
  • Contract balances and pool shares have limit, the liabilities and spendable set to null.
  • live_until_ledger is set only for contract storage entries.
  • decimals is null for a contract token with unknown decimals; balance is then in raw units, equal to balance_raw.
  • name and symbol are null when the token has no metadata (classic assets usually have none).

Spendable

  • XLM: balance minus minimum_balance minus selling_liabilities.
  • Trustline: balance minus selling_liabilities, or 0 when the trustline is not authorized.
  • In the example, 49,309.81 USDC is locked in offers, so only 5,506.26 is spendable.

Account block

For a G... address the response adds account, the account entry itself. For a C... address it is absent. For a valid G... address that does not exist on the network (never funded, or merged), the response is 200 with "account": null and no records, so check it before reading account.spendable.

Parameters

Holdings is allowed for publishable keys (without as_of_ledger), so a wallet page can call it from the browser.

Credits

On Mainnet: 1 credit per started 100 records, so a 4-record page costs 1 credit. With as_of_ledger the read costs 5 per 100 records, and each unverified token simulated with include=unverified adds 1. Testnet requests cost 0 credits and count toward the daily Testnet cap of 10,000 requests.

Errors

See errors for the body and retry rules.

Next