Get liquidity of a pair

Returns balance updates on Ethereum, where balance update address is 0xc2ea…539d and currency smart contract is 0xaaeE…1C7a or 0xC02a…6Cc2, sorted by balance, highest first: currency name and sum of balance update amount.

By Akshat · saved 29 May 2024 · run 1 time · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: archive, network: eth) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0xc2eaB7d33d3cB97692eCB231A5D0e4A649Cb539d"}}, Currency: {SmartContract: {in: ["0xaaeE1A9723aaDB7afA2810263653A34bA2C21C7a","0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"]}}}
      orderBy: {descendingByField: "balance"}
    ) {
      Currency {
        Name
      }
      balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
    }
  }
}

Similar queries