Skip to main content
POST
/
95e61622bf6a8af293978377718e3b77
/
wallet
/
getblockbalance
wallet/getblockbalance
curl --request POST \
  --url https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbalance \
  --header 'Content-Type: application/json' \
  --data '{
  "hash": "0000000004986736812cbf15ffbcdd229bd3d76a595db895719867cc2da3a5bd",
  "number": 77096758,
  "visible": true
}'
{
  "timestamp": 123,
  "block_identifier": {
    "hash": "<string>",
    "number": 123
  },
  "transaction_balance_trace": [
    {
      "transaction_identifier": "<string>",
      "operation": [
        {
          "operation_identifier": 123,
          "address": "<string>",
          "amount": 123
        }
      ],
      "type": "<string>",
      "status": "<string>"
    }
  ]
}
TRON API method that returns the balance deltas within a specific block. It shows, per transaction, how account balances changed in that block.
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

  • hash — block hash as a 64‑character hex string.
  • number — block number. Must match the provided hash.
  • visible — optional boolean. When true, addresses are base58; when false, hex. Default is true.

Response

  • timestamp — block timestamp in milliseconds.
  • block_identifier — object with hash and number.
  • transaction_balance_trace — array per transaction with:
    • transaction_identifier — transaction hash.
    • operation — list with operation_identifier, address, and amount (sun; negative for debits, positive for credits).
    • type — contract type (for example, TransferContract).
    • status — execution status.

Use case

  • Auditing balance changes for a given block.
  • Building explorers or analytics that summarize per‑address deltas.
  • Reconciling application balances against chain state.

curl example

Shell
curl --request POST \
  --url 'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getblockbalance' \
  --header 'Content-Type: application/json' \
  --data '{
    "hash": "0000000004986736812cbf15ffbcdd229bd3d76a595db895719867cc2da3a5bd",
    "number": 77096758,
    "visible": true
  }'

get a valid block pair automatically

Shell
# requires jq
BLOCK_ID=$(curl -s -X POST \
  'https://tron-mainnet.core.chainstack.com/95e61622bf6a8af293978377718e3b77/wallet/getnowblock' \
  -H 'Content-Type: application/json' --data '{}' | 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/getblockbalance' \
  --header 'Content-Type: application/json' \
  --data "{\n  \"hash\": \"$BLOCK_ID\",\n  \"number\": $NUMBER,\n  \"visible\": true\n}"
  • provide both hash (64 hex chars) and number that match the same block to avoid errors like INVALID hex String, hash length not equals 32, or number and hash do not match.
  • amounts are in sun (1 TRX = 1,000,000 sun).

Body

application/json
hash
string
required

Block hash (64 hex chars)

number
integer
required

Block number (must match the hash)

visible
boolean
default:true

Response

200 - application/json

Block balance changes information

timestamp
integer
block_identifier
object
transaction_balance_trace
object[]

Per-transaction balance deltas within the block