Initial and current liquidity of a pool

Returns 2 transfers and balance updates on Ethereum, where transfer receiver is 0x44cc…c8e7 and balance update address is 0x44cc…c8e7, sorted by balance, highest first: transaction hash, transfer amount, amount in USD, smart contract, currency name, currency symbol, sum of balance update amount and balance update address.

By Akshat · saved 29 July 2024 · run 6 times · Bitquery API v2

What it returns

Filters

The query

query MyQuery {
  EVM(dataset: combined, network: eth) {
    Initial_liquidity: Transfers(
      limit: {count: 2}
      orderBy: {ascending: Block_Time}
      where: {Transfer: {Receiver: {is: "0x44cc738e692921e7ac967367b800b8e132e5c8e7"}}}
    ) {
      Transaction {
        Hash
      }
      Transfer {
        Amount
        AmountInUSD
        Currency {
          SmartContract
          Name
          Symbol
        }
      }
    }
    Current_liquidity: BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: "0x44cc738e692921e7ac967367b800b8e132e5c8e7"}}}
      orderBy: {descendingByField: "balance"}
    ) {
      Currency {
        Name
        SmartContract
      }
      balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0"})
      BalanceUpdate {
        Address
      }
    }
  }
}

Similar queries