This event is sent under the following conditions:
- Balance events are emitted once per block whenever a balance changes.
- Balances are emitted per asset, per address, and per block. If multiple transactions within the same block change a balance, the balance event reflects all changes in a single event.
- A customer must have a rule with the
address
variable type and the variable must contain the address of the balance as its value.
Supported Protocols
bitcoin/mainnet
bitcoin/testnet
bitcoincash/mainnet
dogecoin/mainnet
ethereum/mainnet
ethereum/holesky
litecoin/mainnet
optimism/mainnet
polkadot/mainnet
polkadot/westend
polygon/mainnet
polygon/amoy
Schema
{
"data": {
"block_number": "integer",
"block_hash": "string",
"block_timestamp": "integer",
"address": "string",
"value": "integer",
"asset": "string"
}
}
The table below shows the schema breakdown:
Field | Type | Description |
---|---|---|
block_hash | string | (Required) The block hash. |
block_number | integer | (Required) The block number. |
block_timestamp | integer | (Required) The UNIX timestamp when the block was mined/validated. |
address | string | (Required) The account address. This matches the address in a customer’s variable values for the address variable type. |
asset | string | (Required) The asset type of the balance. - For native tokens like ETH for Ethereum, the asset will be set to native .- For non-native tokens like ERC20 tokens will have their specific denomination. |
value | integer | The value of the balance for the address and asset at this block height. The value is in the lowest denomination of the asset. For example: - For ETH , the value is in wei .- For BTC , the value is in satoshi . |
Examples
Bitcoin Example
{
"event_type": "unified_confirmed_balance",
"protocol": "bitcoin",
"network": "mainnet",
"chain_id": "bip122:000000000019d6689c085ae165831e93",
"data": {
"block_number": 831401,
"block_hash": "0000000000000000000004264eb2cfa81bdd04998932e960644fa979030f5fda",
"block_timestamp": 1708519012,
"address": "bc1qm34lsc65zpw79lxes69zkqmk6ee3ewf0j77s3h",
"value": 1118789134970,
"asset":"native"
}
}
Bitcoin Cash Example
Note:
Bitcoin Cash (BCH) address events use the Cash Address format with the "
bitcoincash
: prefix". To convert between formats, you can use this Cash Address Converter.
{
"protocol": "bitcoincash",
"network": "mainnet",
"event_type": "unified_confirmed_balance",
"chain_id": "bip122:000000000000000000651ef99cb9fcbe",
"data": {
"block_number": 865753,
"block_hash": "000000000000000000a4f070c9f055a00b775657e3a21dc3bdc42438c1ad6c51",
"block_timestamp": 1727725093,
"address": "bitcoincash:qp028nlln35nwnv5a9dssw9w57z5n765rgenr3suw6",
"value": 3368930018127,
"asset": "native"
}
}
Polkadot Example
{
"protocol": "polkadot",
"network": "mainnet",
"event_type": "unified_confirmed_balance",
"chain_id":"polkadot:91b171bb158e2d3848fa23a9f1c25182",
"data": {
"block_number": 19581221,
"block_hash": "0xcca09c910a765a515befdaede371e4cf65d48eaf48714ed76a031b64ba4c603e",
"block_timestamp": 1708518792,
"address": "12xtAYsRUrmbniiWQqJtECiBQrMn8AypQcXhnQAc6RB6XkLW",
"asset": "native",
"value": 345709198148936143
}
}
👋 Need Help?
Contact us through email or our support page for any issues, bugs, or assistance you may need.