Smart Contract balance by currencies
Returns one balance update on Ethereum, where balance update address is 0xc02a…6cc2, currency smart contract is 0xc02a…6cc2 and currency smart contract is not 0x, sorted by sum, highest first: chain ID, count, currency symbol, smart contract, currency name, sum of balance update amount and sum of balance update amount in USD.
What it returns
- chain ID
- count
- currency symbol
- smart contract
- currency name
- sum of balance update amount
- sum of balance update amount in USD
Filters
- balance update address is 0xc02a…6cc2
- currency smart contract is 0xc02a…6cc2
- currency smart contract is not 0x
The query
query ($network: evm_network, $address: String!) {
EVM(network: $network, dataset: archive) {
BalanceUpdates(
orderBy: {descendingByField: "sum"}
where: {BalanceUpdate: {Address: {is: $address}}, Currency: {SmartContract: {not: "0x"}}}
) {
ChainId
count
Currency {
Symbol
SmartContract
Name
}
sum(of: BalanceUpdate_Amount, selectWhere: {gt: "0.0"})
sum_usd: sum(of: BalanceUpdate_AmountInUSD, selectWhere: {gt: "0.0"})
}
Transfers(
limit: {count: 1}
where: {Transfer: {Currency: {SmartContract: {is: $address}}}}
) {
Transfer {
Currency {
Name
Symbol
SmartContract
}
}
}
}
}
Variables
{
"offset": 0,
"network": "eth",
"address": "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