query_balances_

Returns balance updates on Base, where balance update address is 0x4C7D…60CB, 0xb4d8…332c or 1 more, sorted by amount, highest first: balance update address, currency symbol, smart contract, decimals, currency name and sum of balance update amount.

By Omkar_BQ · saved 31 October 2024 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query getTokenBalances($dataset: dataset_arg_enum!, $network: evm_network, $wallets: [String!]) {
  EVM(dataset: $dataset, network: $network) {
    BalanceUpdates(
      orderBy: { descendingByField: "Amount" }
      where: {
        BalanceUpdate: { Address: { in: $wallets } }
      }
    ) {
      BalanceUpdate {
        Address
      }
      Currency {
        Symbol
        SmartContract
        Decimals
        Name
      }
      # Prevent pull token with small amounts
      Amount: sum(of: BalanceUpdate_Amount, selectWhere: { gt: "0.001" })
    }
  }
}

Variables

{
  "network": "base",
  "wallets": [
      "0x4C7D7B58B0DA6a7dc7D49F48869318942a0F60CB",
      "0xb4d857f275da05982b0ffc7fac19f3fcdb1e332c",
      "0x5dc76a02c49d6f15fbde0506e0d7cc630cee5db2"
  ],
  "dataset": "combined"
}

Similar queries