optimised historical balance
Returns one balance update on Ethereum, where balance update address is 0x477b…6b6F, currency smart contract is 0xAC51…63E8 and block date since 2018-01-01: sum of balance update amount, block number and block time.
What it returns
- sum of balance update amount
- block number
- block time
Filters
- balance update address is 0x477b…6b6F
- currency smart contract is 0xAC51…63E8
- block date since 2018-01-01
- block time till 2025-08-31
The query
query EthereumBalance($time: DateTime, $walletAddress: String, $contractAddress: String) {
EVM(network: eth, dataset: combined) {
BalanceUpdates(
where: {Block: {Date: {since: "2018-01-01"}, Time: {till: $time}}, BalanceUpdate: {Address: {is: $walletAddress}}, Currency: {SmartContract: {is: $contractAddress}}}
) {
balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
}
latestBlock: Blocks(where: {Block: {Time: {till: $time}}}, limit: {count: 1}) {
Block {
Number(maximum: Block_Number)
Time(maximum: Block_Time)
}
}
}
}
Variables
{
"time": "2025-08-31T16:00:00Z",
"walletAddress": "0x477b8D5eF7C2C42DB84deB555419cd817c336b6F",
"contractAddress": "0xAC51066d7bEC65Dc4589368da368b212745d63E8"
}
Similar queries
- eth balance · Ethereum · BalanceUpdates
- Ethereum balance view · Ethereum · BalanceUpdates
- Balance update API explanation · Ethereum · BalanceUpdates
- MyQuery EVM · BNB Chain · BalanceUpdates
- usdt_holder_balance_update_ · Ethereum · BalanceUpdates