WAX Get Balance icon

WAX Get Balance

Get token balance for an account

WAX Get Balance

AI-generated

Summary

Fetch token balance for each account from a WAX contract endpoint.

Inputs

  • account (required) — The account name whose balance to query.
  • contract (required) — The token contract code (default 'eosio.token').
  • symbol — Symbol of the token; optional, defaults to 'WAX'.
  • endpoint (required) — API endpoint URL for the WAX service.

Output shape

array of objects each with fields account (string), contract (string), symbol (string), balance (number)

If the balance cannot be found, it is returned as '0 ' and parsed to a numeric value; missing symbol results in default 'WAX'.

Examples

Example 1: Retrieve WAX token balance for accounts 'alice' and 'bob' using default contract and symbol.

account: alice, contract: eosio.token, symbol: WAX, endpoint: https://wax.greymass.com

Discussion