Skip to main content
TRON API method that retrieves the TRX balance and related balance information for a specific account. This method provides comprehensive balance data including available balance, frozen balance, and delegated resources.
Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.

Parameters

  • account_identifier.address — the account address to query. Use base58 with visible: true, or hex with visible: false.
  • block_identifier — required object specifying the block to query. Provide both the 32‑byte hash (64 hex chars) and the matching number.
  • visible — optional boolean for address format. Default is false (hex).

Response

  • balance — available TRX balance (in sun, where 1 TRX = 1,000,000 sun)
  • frozen — array of frozen balance information
    • frozen_balance — amount of TRX frozen
    • expire_time — expiration timestamp for frozen balance
  • delegated_frozenV2 — delegated frozen balance information for v2 staking
  • undelegated_frozenV2 — undelegated frozen balance information for v2 staking

Use case

The wallet/getaccountbalance method is used for:
  • Checking available TRX balance for transactions and transfers.
  • Monitoring frozen balance and staking information.
  • Analyzing delegated resource allocations.
  • Managing account liquidity and resource planning.

curl examples

Get current balance with a base58 address (at a specific block):
Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getaccountbalance' \
  --header 'Content-Type: application/json' \
  --data '{
    "account_identifier": { "address": "TZ4UXDV5ZhNW7fb2AMSbgfAEZ7hWsnYS2g" },
    "block_identifier": { "hash": "0000000004986736812cbf15ffbcdd229bd3d76a595db895719867cc2da3a5bd", "number": 77096758 },
    "visible": true
  }'
Get balance at a specific block using a hex address:
Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getaccountbalance' \
  --header 'Content-Type: application/json' \
  --data '{
    "account_identifier": { "address": "41608f8da72479edc7dd921e4c30bb7e7cddbe722e" },
    "block_identifier": { "hash": "0000000004986736812cbf15ffbcdd229bd3d76a595db895719867cc2da3a5bd", "number": 77096758 },
    "visible": false
  }'
  • avoid INVALID hex String by providing a real 32‑byte block hash (64 hex chars).
  • avoid account_identifier is null by passing account_identifier: { address: ... } rather than a top‑level address.
  • avoid block_identifier null and hash length not equals 32 by always including block_identifier.hash with 64 hex chars, and block_identifier.number that matches the same block.

find a valid block hash

Use wallet/getnowblock to fetch the latest block and copy the blockID field as the block_identifier.hash value.
Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnowblock' \
  --header 'Content-Type: application/json'
Alternatively, get a specific block with wallet/getblockbynum and use its blockID.

working example (auto picks latest block)

Run this to fetch the latest blockID, resolve its block number, and immediately query the balance at that block.
Shell
# requires jq
BLOCK_ID=$(curl -s -X POST \
  'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnowblock' \
  -H 'Content-Type: application/json' | jq -r '.blockID')
NUMBER=$(curl -s -X POST \
  'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid' \
  -H 'Content-Type: application/json' \
  --data "{\"value\": \"$BLOCK_ID\"}" | jq -r '.block_header.raw_data.number')

curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getaccountbalance' \
  --header 'Content-Type: application/json' \
  --data "{\n  \"account_identifier\": { \"address\": \"41608f8da72479edc7dd921e4c30bb7e7cddbe722e\" },\n  \"block_identifier\": { \"hash\": \"$BLOCK_ID\", \"number\": $NUMBER },\n  \"visible\": false\n}"
If jq is not available, use Python instead:
Shell
BLOCK_ID=$(curl -s -X POST \
  'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnowblock' \
  -H 'Content-Type: application/json' | python3 -c 'import sys,json; print(json.load(sys.stdin)["blockID"])')
NUMBER=$(curl -s -X POST \
  'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbyid' \
  -H 'Content-Type: application/json' \
  --data "{\"value\": \"$BLOCK_ID\"}" | python3 -c 'import sys,json; print(json.load(sys.stdin)["block_header"]["raw_data"]["number"])')

curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getaccountbalance' \
  --header 'Content-Type: application/json' \
  --data "{\n  \"account_identifier\": { \"address\": \"41608f8da72479edc7dd921e4c30bb7e7cddbe722e\" },\n  \"block_identifier\": { \"hash\": \"$BLOCK_ID\", \"number\": $NUMBER },\n  \"visible\": false\n}"