Skip to main content

Base Chain Balance API

In this section we will see how to monitor real-time balance changes across the Base blockchain

Subscribe to Balance Updates of a Particular Wallet

The query will subscribe you to real-time updates for balance changes on the Base blockchain, providing a continuous stream of data as new transactions are processed and recorded. Here we have used address 0x4200000000000000000000000000000000000006. You can find the query here

The balance update does not inherently include transaction fees. Therefore, to get the actual balance after all transactions and fees, you need to subtract the total transaction fees from the balance updates.

subscription {
EVM(network: base) {
BalanceUpdates(
where: {BalanceUpdate: {Address: {is: "0x4200000000000000000000000000000000000006"}}}
) {
Currency {
Name
}
BalanceUpdate {
Address
Amount
Type
}
Block {
Time
}
Transaction {
Hash
}
}
}
}

Video Tutorial | How to get Balance of an Address on Base network