wallet asset balance example

Returns balance updates on Ethereum, where balance update address is 0x04b2…1a88, sorted by balance in USD, highest first: currency name, sum of balance update amount, sum of balance update amount in USD and balance update address.

By Edgar Nwajei · saved 12 November 2024 · run 3 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0x04b21735e93fa3f8df70e2da89e6922616891a88"}}}
      orderBy: {descendingByField: "balanceInUSD"}
    ) {
      Currency {
        Name
      }
      balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      balanceInUSD: sum(of: BalanceUpdate_AmountInUSD, selectWhere: {gt: "0"})
      BalanceUpdate {
        Address
      }
    }
  }
}

Similar queries