getTokenLiquidity

Get the liquidity from the USDC/USDT POOL For some reason somthing I get One token and others time two

By Jose · saved 16 October 2024 · run 9 times · Bitquery API v2

What it returns

Filters

The query

# Get the liquidity from the USDC/USDT POOL
# For some reason somthing I get One token and others time two 
query getTokenLiquidity(
  $dataset: dataset_arg_enum!
  $network: evm_network!
  $tokenAddress: String!
  $sideTokenAddress: String!
  $pairAddress: String!
  $till: DateTime!
) {
  EVM(dataset: $dataset, network: $network) {
    BalanceUpdates(
      where: {Block: {Time: {till: $till}}, BalanceUpdate: {Address: {is: $pairAddress}}, Currency: {SmartContract: {in: [$tokenAddress, $sideTokenAddress]}}}
      orderBy: {descendingByField: "BalanceInUSD"}
    ) {
      Currency {
        Symbol
        Name
      }
      BalanceInUSD: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0.001"})
    }
  }
}

Variables

{
    "dataset": "realtime",
    "network": "arbitrum",
    "sideTokenAddress": "0xaf88d065e77c8cc2239327c5edb3a432268e5831",
  	"tokenAddress": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
    "pairAddress": "0xa17afcab059f3c6751f5b64347b5a503c3291868",
    "till": "2024-10-18T18:17:27.000Z"
  }

Similar queries