Ethereum balance at 2 different blocks

Returns balance updates on Ethereum, where balance update address is 0xcf1D…35f6 and currency smart contract is 0x: currency name, currency symbol, smart contract and sum of balance update amount.

By gaurav · saved 26 April 2024 · run 4 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: archive, network: eth) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0xcf1DC766Fc2c62bef0b67A8De666c8e67aCf35f6"}}, Currency: {SmartContract: {is: "0x"}}}
    ) {
      Currency {
        Name
        Symbol
        SmartContract
      }
      balance1: sum(
        of: BalanceUpdate_Amount
        selectWhere: {gt: "0"}
        if: {Block: {Number: {le: "17100000"}}}
      )
      balance2: sum(
        of: BalanceUpdate_Amount
        selectWhere: {gt: "0"}
        if: {Block: {Number: {le: "19731118"}}}
      )
    }
  }
}

Similar queries