WAX Kit Get Balance icon

WAX Kit Get Balance

Get token balance for an account

WAX Kit Get Balance

AI-generated

Summary

Fetches the balance of a token for a WAX blockchain account by calling the chain API's get_currency_balance endpoint, and returns it as a number for each input item.

Inputs

  • Account Name (required) — WAX account whose balance is queried.
  • Token Contract (required) — Token contract account to query (default eosio.token). Sent as 'code'.
  • Symbol — Token symbol (default WAX). If set, it is sent to the API to filter the balance; it is also used to pick the matching balance from the response.
  • API Endpoint (required) — Base URL of the WAX API node (default https://wax.greymass.com). The node POSTs to {endpoint}/v1/chain/get_currency_balance.

Output shape

One output item per input item, each with json fields: account, contract, symbol, balance (a float).

The node requires a credential and runs a license check before executing. The balance is parsed from the asset string (e.g. '12.3456 WAX') matching the symbol. If no matching entry is returned, the balance is 0. If Symbol is empty, the matching is loose and the result may not be meaningful. The node is flagged hidden in the UI. HTTP errors from the API are not specifically handled and will fail the node.

Examples

Example 1: Check a wallet's WAX balance

Account Name: myaccount.wam; leave Token Contract eosio.token, Symbol WAX, and default endpoint.

Example 2: Check a custom token balance

Account Name: myaccount.wam; Token Contract: alien.worlds; Symbol: TLM.

Links

Discussion