getTokenLiquidity
Returns balance updates on Ethereum, where balance update address is 0x0d4a…1852 and currency smart contract is 0xc02a…6cc2 or 0xdac1…1ec7, sorted by balance, highest first: currency name, smart contract, sum of balance update amount and balance update address.
What it returns
- currency name
- smart contract
- sum of balance update amount
- balance update address
Filters
- balance update address is 0x0d4a…1852
- currency smart contract is 0xc02a…6cc2 or 0xdac1…1ec7
The query
query getTokenLiquidity($dataset: dataset_arg_enum!, $network: evm_network!, $tokenAddress: String!, $sideTokenAddress: String!, $pairAddress: String!) {
EVM(dataset: $dataset, network: $network) {
Current_lquidity: BalanceUpdates(
where: {BalanceUpdate: {Address: {is: $pairAddress}}, Currency: {SmartContract: {in: [$tokenAddress, $sideTokenAddress]}}}
orderBy: {descendingByField: "balance"}
) {
Currency {
Name
SmartContract
}
balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0.00"})
BalanceUpdate {
Address
}
}
}
}
Variables
{
"dataset": "combined",
"network": "eth",
"pairAddress": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"tokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"sideTokenAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7"
}
Similar queries
- eth balance · Ethereum · BalanceUpdates
- Ethereum balance view · Ethereum · BalanceUpdates
- Balance update API explanation · Ethereum · BalanceUpdates
- MyQuery EVM · BNB Chain · BalanceUpdates
- usdt_holder_balance_update_ · Ethereum · BalanceUpdates