top tokens on optimism
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: EVM(network: $network, dataset: combined) archive full history combined archive + realtime in one resu
What it returns
- currency symbol
- smart contract
- fungible
- currency name
- trade amount
- amount in USD
- unique of trade side currency smart contract
- unique of trade DEX smart contract
- sum of trade amount
- sum of trade amount in USD
- unique of trade buyer
- unique of trade sender
- count
Filters
- block time since 2024-11-12
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:
#
# EVM(network: $network, 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/
#
query topTokens($network: evm_network, $time_ago: DateTime!) {
EVM(network: $network) {
DEXTradeByTokens(
orderBy: {descendingByField: "count"}
limit: {count: 100}
where: {Block: {Time: {since: $time_ago}}}
) {
Trade {
Currency {
Symbol
SmartContract
Fungible
Name
}
Amount(maximum: Block_Number)
AmountInUSD(maximum: Block_Number)
}
pairs: uniq(of: Trade_Side_Currency_SmartContract)
dexes: uniq(of: Trade_Dex_SmartContract)
amount: sum(of: Trade_Amount)
usd: sum(of: Trade_AmountInUSD)
buyers: uniq(of: Trade_Buyer)
sellers: uniq(of: Trade_Sender)
count
}
}
}
Variables
{
"network": "optimism",
"time_ago": "2024-11-12T07:37:52Z"
}
Similar queries
- AfricaCryptoChainx · Ethereum · DEXTradeByTokens
- UniversalSearch EVM · Ethereum · DEXTradeByTokens
- trade stats for a token pair on uniswap v4 optimism · Optimism · DEXTradeByTokens
- get virtual pool address for a token on uniswap v4 optimism · Optimism · DEXTradeByTokens
- Optimism pair list · Optimism · DEXTradeByTokens