Balance for multiple addresses for multiple currencies using BalanceUpdate API

Returns balance updates on Ethereum, where balance update address is 0xcf1D…35f6 or 0x11db…b5be and currency smart contract is 0x, 0x1e0f…fd7f or 1 more, sorted by balance update address, highest first: currency name, smart contract, sum of balance update amount and balance update address.

By gaurav · saved 5 March 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: archive, network: eth) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {in: ["0xcf1DC766Fc2c62bef0b67A8De666c8e67aCf35f6", "0x11dbf181dd5c075c2abd92cb9579c4809406b5be"]}}, Currency: {SmartContract: {in: ["0x", "0x1e0fad3fc0fd2d1479bc5a5e09c6b88a3426fd7f", "0x8f8221afbb33998d8584a2b05749ba73c37a938a"]}}}
      orderBy: {descending: BalanceUpdate_Address}
    ) {
      Currency {
        Name
        SmartContract
      }
      balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      BalanceUpdate {
        Address
      }
    }
  }
}

Similar queries