getTokenLiquidity

Returns balance updates on Ethereum, where balance update address is 0xa210…b974 and currency smart contract is 0xC02a…6Cc2 or 0x5149…86CA, sorted by amount, highest first: currency symbol, currency name and sum of balance update amount.

By Jose · saved 22 October 2024 · run 8 times · Bitquery API v2

What it returns

Filters

The query

query getTokenAmountLiquidity(
  $dataset: dataset_arg_enum!
  $network: evm_network!
  $tokenAddress: String!
  $sideTokenAddress: String!
  $pairAddress: String!
) {
  EVM(dataset: $dataset, network: $network) {
    BalanceUpdates(
      where: {BalanceUpdate: {Address: {is: $pairAddress}}, Currency: {SmartContract: {in: [$tokenAddress, $sideTokenAddress]}}}
      orderBy: {descendingByField: "Amount"}
    ) {
      Currency {
        Symbol
        Name
      }
      Amount: sum(of: BalanceUpdate_Amount)
    }
  }
}

Variables

{
  "network": "eth",
  "dataset": "combined",
  "pairAddress": "0xa2107FA5B38d9bbd2C461D6EDf11B11A50F6b974",
  "tokenAddress": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
  "sideTokenAddress": "0x514910771AF9Ca656af840dff83E8264EcF986CA",
  "till": "2024-10-17T05:35:27.481Z"
}

Similar queries