Average fee per trade, Total fees, total volume, trades count per DEX program
Historical data This query uses the realtime dataset (the default), which holds only a recent window - hours to days depending on the cube. For older data add a dataset to the top-level element: Solana(dataset: combined) archive full history combined archive + realtime in one result Archive and c
What it returns
- count
- sum of amounts in USD quote
- sum of transaction header fee
- average of transaction header fee
- program
- protocol
- protocol family
Filters
- market network is Solana
The query
# Historical data
# This query uses the realtime dataset (the default), which holds only a
# recent window - hours to days depending on the cube.
#
# For older data add a dataset to the top-level element:
#
# Solana(dataset: combined)
#
# archive full history
# combined archive + realtime in one result
#
# Archive and combined need the historical data add-on:
# https://bitquery.io/pricing
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
{
Trading {
Trades(
limit:{count:100}
orderBy: {descendingByField: "Average_Fee_per_DEX"}
where: {Block: {Time: {since_relative: {hours_ago: 1}}}, Pair: {Market: {Network: {is: "Solana"}}}}
) {
Trades_count_dex:count
Dex_Volume:sum(of:AmountsInUsd_Quote)
Total_fees_DEX:sum(of:TransactionHeader_Fee)
Average_Fee_per_DEX: average(of:TransactionHeader_Fee)
Pair{
Market{
Program
Protocol
ProtocolFamily
}
}
}
}
}
Similar queries
- Trading API: Solana Trades with Transaction Hash · Trading (all chains) · Trades
- Elysium latest trades of one token (WHYPE) · Trading (all chains) · Trades
- FOMO App: Trades per Day (Trading API) · Trading (all chains) · Trades
- save with commit · Trading (all chains) · Tokens