Average Tip in terms of avg gas Fee
Returns the latest 10 transaction balances on Ethereum, where token balance balance change reason code is 5: block number, balance change reason code, currency name, currency symbol, smart contract, average of fee sender fee, sum of token balance post balance and 5 more fields.
What it returns
- block number
- balance change reason code
- currency name
- currency symbol
- smart contract
- average of fee sender fee
- sum of token balance post balance
- sum of token balance post balance in USD
- sum of token balance pre balance
- sum of token balance pre balance in USD
- calculate
- count
Filters
- token balance balance change reason code is 5
The query
query MyQuery {
EVM(network: eth, dataset: realtime) {
TransactionBalances(
limit: {count: 10}
orderBy: {descending: Block_Number}
where: {TokenBalance: {BalanceChangeReasonCode: {eq: 5}}, Block: {Time: {since_relative: {hours_ago:24}}}}
) {
Block {
Number
}
TokenBalance {
BalanceChangeReasonCode
Currency {
Name
Symbol
SmartContract
}
}
avg_gasfees_in_this_block: average(of: Fee_SenderFee)
Post: sum(of: TokenBalance_PostBalance)
Post_USD: sum(of: TokenBalance_PostBalanceInUSD)
Pre: sum(of: TokenBalance_PreBalance)
Pre_USD: sum(of: TokenBalance_PreBalanceInUSD)
Total_tip_native: calculate(expression: "$Post - $Pre")
Total_tip_usd: calculate(expression: "$Post_USD - $Pre_USD")
number_of_tips: count
avg_tip_in_this_block: calculate(
expression: "$Total_tip_native / $number_of_tips"
)
avg_tip_usd_in_this_block: calculate(
expression: "$Total_tip_usd / $number_of_tips"
)
tip_in_terms_of_gasfees: calculate(
expression: "( $avg_gasfees_in_this_block - $avg_tip_in_this_block ) / $avg_gasfees_in_this_block"
)
}
}
}
Similar queries
- latest token supply on USDT and USDC on ethereum chain · Ethereum · TransactionBalances
- Get Token Total Supply and Market Cap · Ethereum · TransactionBalances
- latest token supply of all active tokens on ETH chain · Ethereum · TransactionBalances
- Transaction balances · Ethereum · TransactionBalances
- All MEV Builders Tx Balance Tracker · Ethereum · TransactionBalances