getTokenLiquidity
Returns balance updates on Ethereum, where balance update address is 0x5d81…11cb and currency smart contract is 0x8c1b…6549 or 0xc02a…6cc2, 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 0x5d81…11cb
- currency smart contract is 0x8c1b…6549 or 0xc02a…6cc2
The query
query getTokenLiquidity($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: "balance"}
) {
Currency {
Name
SmartContract
}
balance: sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0.00"})
BalanceUpdate {
Address
}
}
}
}
Variables
{
"dataset": "combined",
"network": "eth",
"pairAddress": "0x5d811a9d059ddab0c18b385ad3b752f734f011cb",
"tokenAddress": "0x8c1bed5b9a0928467c9b1341da1d7bd5e10b6549",
"sideTokenAddress": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
}
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