getTokenLiquidity
Get the liquidity from the USDC/USDT POOL For some reason somtimes I get One token and others time two
What it returns
- currency symbol
- currency name
- sum of balance update amount
Filters
- balance update address is 0xa17a…1868
- currency smart contract is 0xfd08…cbb9 or 0xaf88…5831
- block time till 2024-10-18
The query
# Get the liquidity from the USDC/USDT POOL
# For some reason somtimes 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
- MyQuery EVM · BNB Chain · BalanceUpdates
- search address v2 · Ethereum · BalanceUpdates
- balance of an address on multiple chains · Ethereum · BalanceUpdates
- WETH_issue · Arbitrum · BalanceUpdates
- Arbitrum Balance_ · Arbitrum · BalanceUpdates