Copy of Smart Contract balance by currencies

Returns one balance update on BNB Chain, where balance update address is 0xe430…C983, currency smart contract is 0xe430…C983 and currency smart contract is not 0x, sorted by sum, highest first: chain ID, count, currency symbol, smart contract, currency name, sum of balance update amount and sum of balance update amount in USD.

By Majid2 · saved 26 April 2025 · Bitquery API v2

What it returns

Filters

The query

query ($network: evm_network, $address: String!) {
  EVM(network: $network, dataset: realtime) {
    BalanceUpdates(
      orderBy: {descendingByField: "sum"}
      where: {BalanceUpdate: {Address: {is: $address}}, Currency: {SmartContract: {not: "0x"}}}
    ) {
      ChainId
      count
      Currency {
        Symbol
        SmartContract
        Name
      }
      sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0.0"})
      sum_usd: sum(of: BalanceUpdate_AmountInUSD, selectWhere: {gt: "0.0"})
    }
    Transfers(
      limit: {count: 1}
      where: {Transfer: {Currency: {SmartContract: {is: $address}}}}
    ) {
      Transfer {
        Currency {
          Name
          Symbol
          SmartContract
        }
      }
    }
  }
}

Variables

{"offset":0,"network":"bsc","address":"0xe430f15477dD0642354EC6C82d368D5005dDC983","mempool":false}

Similar queries