balance of all liquidity pools for a given token

Returns DEX trades by token, where currency smart contract is 0x0f7d…ccc8: smart contract, protocol family, protocol name, count, currency name and sum of balance update amount.

By gaurav · saved 5 June 2025 · run 3 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined) {
    DEXTradeByTokens(
      where: {Trade: {Currency: {SmartContract: {is: "0x0f7dc5d02cc1e1f5ee47854d534d332a1081ccc8"}}}}
    ) {
      Trade {
        Dex {
          SmartContract
          ProtocolFamily
          ProtocolName
        }
      }
      count
      joinBalanceUpdates(join: inner, BalanceUpdate_Address: Trade_Dex_SmartContract) {
        Currency {
          Name
          SmartContract
        }
        balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      }
      Trade {
        Dex {
          SmartContract
          ProtocolFamily
          ProtocolName
        }
      }
    }
  }
}

Similar queries