getblockbalance - Tron
getblockbalance. Returns the aggregated balance changes for all accounts within a specific block.
getblockbalance - tron [Value: 20CU]
Returns the aggregated balance changes for all accounts within a specific block.
Use cases
- Audit total TRX movement within a specific block
- Reconcile fee burn and reward distribution for a block
Constraints
- Requires either hash or number to identify the block; providing both is recommended for verification
- Only available on full history / archive nodes for older blocks
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/getblockbalance \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"hash": "example", "number": 1, "visible": true}'Response
200
{
"block_identifier": {
"hash": "000000000000dc2a3731e28a75b49ac1379bcc425afc95f6ab3916689fbb0189",
"number": 56362
},
"timestamp": 1530060672000,
"transaction_balance_trace": [
{
"transaction_identifier": "e6cabb1833cd1f795eed39d8dd7689eaa70e5bb217611766c74c7aa9feea80df",
"operation": [
{
"operation_identifier": 0,
"address": "TPttBLmFuykRi83y9HxDoEWxTQw6CCcQ4p",
"amount": -100000
},
{
"operation_identifier": 1,
"address": "TLsV52sRDL79HXGGm9yzwKibb6BeruhUzy",
"amount": 100000
},
{
"operation_identifier": 2,
"address": "TPttBLmFuykRi83y9HxDoEWxTQw6CCcQ4p",
"amount": -10000000
},
{
"operation_identifier": 3,
"address": "TMrysg7DbwR1M8xqhpaPdVCHCuWFhw7uk1",
"amount": 10000000
}
],
"type": "TransferContract",
"status": "SUCCESS"
}
]
}Request params
idinteger
jsonrpcstring
methodstring
object
hashstring
The block hash to query
numberinteger
The block number to query
visibleboolean
When true, addresses are base58check strings; when false (default), hex strings
Response
200
Returns the aggregated balance changes for all accounts within a specific block.Response params
object
block_identifierobject
Identifies the block whose per-account balance changes are being reported.
object
hashstring
The unique hash identifying this block.
numberinteger
The height (sequential number) of this block in the chain.
timestampinteger
Unix timestamp, in ms, at which this block was produced.
transaction_balance_tracearray_of_objects
The list of transactions in this block, each broken down into the individual balance movements it caused.
object
transaction_identifierstring
The unique transaction hash (transaction ID) this balance trace belongs to.
operationarray_of_objects
The individual debit/credit entries that make up this transaction's net effect on account balances.
object
operation_identifierinteger
The sequential index of this balance-change entry within the transaction.
addressstring
The account address affected by this balance-change entry.
amountinteger
The change in TRX balance for this address, in sun; negative for a debit, positive for a credit.
typestring
The contract type that produced these balance changes (e.g. TransferContract).
statusstring
The execution outcome of the transaction (e.g. SUCCESS, FAILED).