getaccountbalance - Tron
getaccountbalance. Returns the TRX balance of an account at a specific block height.
getaccountbalance - tron [Value: 20CU]
Returns the TRX balance of an account at a specific block height.
Use cases
- Confirm a wallet's balance as of a specific historical block for auditing
- Reconcile deposits by checking balance deltas between two block heights
Constraints
- Requires both a valid block hash and matching block number
- Only available on nodes retaining state for the requested historical block
Unlock Access to 100+ chains
Boost your app's speed and reliability with dRPC - get your access API key
Language
Request
Examples
curl --request POST \
--url https://lb.drpc.live/tron/{API-KEY}/wallet/getaccountbalance \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"account_identifier": { "address": "41dd791d6b49e190062d650e6a23c575510d35f2f9" },
"block_identifier": {
"hash": "00000000050bb65bced21f55a75cbbfccc51c5a0efca77ce82d56b8c353e0fd5",
"number": 84653659
}
}'Response
200
{
"balance": 0,
"block_identifier": {
"hash": "00000000050bb65bced21f55a75cbbfccc51c5a0efca77ce82d56b8c353e0fd5",
"number": 84653659
}
}Request params
idinteger
jsonrpcstring
methodstring
object
account_identifierobject
[Required] Object containing the address field to query
block_identifierobject
[Required] Object containing hash and number identifying the block to query the balance at
visibleboolean
When true, addresses are base58check strings; when false (default), hex strings
Response
200
Returns the TRX balance of an account at a specific block height.Response params
object
balanceinteger
TRX balance, in sun, as of the specified block
block_identifierobject
Echoes the block hash and number the balance was read at