PreiseGitHubDashboard

TRON

wallet/getaccountbalance20 Credits

Returns the TRX balance of an account at a given block.

Netzwerk: tron

Parameter

NameTypBeschreibung
account_identifierObjectAccount to query: { address } (base58 when visible is true, hex otherwise).
block_identifierObjectBlock at which to read the balance: { hash, number }; hash and number must refer to the same block.
visiblebooleantrue = base58 addresses (in the request and the response); false (default) = hex addresses. (optional)

Rückgabewert

Typ

Object

Object with balance (TRX in sun) and block_identifier (hash, number of the block the balance belongs to). Needs storage.balance.history.lookup on the node; a missing record reads as balance 0.

Codebeispiele

curl 'https://holy-burned-sky-tron-mainnet.rpcnode.dev/7c9e6679-7425-40de-944b-e07fc1f90ae7/wallet/getaccountbalance' \
  -X POST \
  -H 'content-type: application/json' \
  -d '{
  "account_identifier": {
    "address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy"
  },
  "block_identifier": {
    "hash": "<block hash>",
    "number": 1000000
  },
  "visible": true
}'