Skip to main content
Gets token balances with metadata for a Spark address. Automatically paginates through all token outputs.

Method Signature

Parameters

sparkAddress
string
required
The Spark address to query.
tokenIdentifiers
string[]
Optional array of Bech32m token identifiers to filter by. If omitted, returns all tokens.

Returns

tokenBalances
TokenBalanceMap
required
Map of token identifiers to balance and metadata objects. Each entry contains:
  • ownedBalance: Total tokens owned (including pending outbound)
  • availableToSendBalance: Tokens available to send
  • tokenMetadata: Name, ticker, decimals, issuer key, max supply

Example