Top 10 arb tokens by price change in last 1 hr
Historical data This query already reads history - it uses the combined dataset, which needs the historical data add-on for this chain. Without the add-on it fails with 'access restricted: your plan only allows realtime'. Drop the dataset argument to fall back to the recent window. Datasets: https:
What it returns
- currency name
- currency symbol
- smart contract
- price in USD
- side currency name
- side currency symbol
- side smart contract
- sum of trade side amount in USD
- calculate
The query
# Historical data
# This query already reads history - it uses the combined dataset, which
# needs the historical data add-on for this chain.
#
# Without the add-on it fails with 'access restricted: your plan only allows
# realtime'. Drop the dataset argument to fall back to the recent window.
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
query MyQuery {
EVM(dataset: combined network:arbitrum) {
DEXTradeByTokens(
limit:{count:10}
orderBy:{descendingByField:"Price_Change_1h"}
where: {TransactionStatus: {Success: true}, Block: {Time: {since_relative: {hours_ago: 24}}}}
) {
Trade {
Currency {
Name
Symbol
SmartContract
}
Price_5min_ago: PriceInUSD(
minimum: Block_Number
if: {Block: {Time: {since_relative: {minutes_ago: 5}}}}
)
Price_1h_ago: PriceInUSD(
minimum: Block_Number
if: {Block: {Time: {since_relative: {hours_ago: 1}}}}
)
Price_6h_ago: PriceInUSD(
minimum: Block_Number
if: {Block: {Time: {since_relative: {hours_ago: 6}}}}
)
Price_24h_ago: PriceInUSD(minimum: Block_Number)
CurrentPrice: PriceInUSD(maximum: Block_Number)
Side {
Currency {
Name
Symbol
SmartContract
}
}
Dex{
SmartContract
}
}
volume_5min: sum(
of: Trade_Side_AmountInUSD
if: {Block: {Time: {since_relative: {minutes_ago: 5}}}}
)
volume_1h: sum(
of: Trade_Side_AmountInUSD
if: {Block: {Time: {since_relative: {hours_ago: 1}}}}
)
volume_6h: sum(
of: Trade_Side_AmountInUSD
if: {Block: {Time: {since_relative: {hours_ago: 6}}}}
)
volume_24h: sum(of: Trade_Side_AmountInUSD)
Price_Change_5min: calculate(
expression: "(($Trade_CurrentPrice - $Trade_Price_5min_ago) / $Trade_Price_5min_ago) * 100"
)
Price_Change_1h: calculate(
expression: "(($Trade_CurrentPrice - $Trade_Price_1h_ago) / $Trade_Price_1h_ago) * 100"
)
Price_Change_6h: calculate(
expression: "(($Trade_CurrentPrice - $Trade_Price_6h_ago) / $Trade_Price_6h_ago) * 100"
)
Price_Change_24h: calculate(
expression: "(($Trade_CurrentPrice - $Trade_Price_24h_ago) / $Trade_Price_24h_ago) * 100"
)
}
}
}
Similar queries
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- AfricaCryptoChainx · Ethereum · DEXTradeByTokens
- UniversalSearch EVM · Ethereum · DEXTradeByTokens
- without fragment · Ethereum · DEXTradeByTokens
- trade stats for a token pair on uniswap v4 arbitrum · Arbitrum · DEXTradeByTokens