Price change 5min 1hr, 6hr precentage of a specific token
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
- price in USD
- sum of trade side amount in USD
- calculate
Filters
- currency mint address is So1111…1112
- market market address is Czfq3x…44zE
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/
#
query MyQuery {
Solana {
DEXTradeByTokens(
where: {Transaction: {Result: {Success: true}}, Trade: {Currency: {MintAddress: {is: "So11111111111111111111111111111111111111112"}}, Market: {MarketAddress: {is: "Czfq3xZZDmsdGdUyrNLtRhGc47cXcZtLG4crryfu44zE"}}}, Block: {Time: {since_relative: {hours_ago: 6}}}}
) {
Trade {
Price_5min_ago: PriceInUSD(minimum:Block_Time if:{Block:{Time:{since_relative:{minutes_ago:5}}}})
Price_1h_ago: PriceInUSD(minimum:Block_Time if:{Block:{Time:{since_relative:{hours_ago:1}}}})
Price_6h_ago: PriceInUSD(minimum: Block_Time)
CurrentPrice: PriceInUSD(maximum: Block_Time)
}
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}}}}
)
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")
}
}
}
Similar queries
- ANSEM daily traders, June 16 to 26, 2026 · Solana · DEXTradeByTokens
- ANSEM swaps per hour, June 27, 2026 · Solana · DEXTradeByTokens
- FOMO App: Top Tokens Bought, Last Hour (Solana) · Solana · DEXTradeByTokens
- FOMO App: Most Active Wallets, Last Hour (Solana) · Solana · DEXTradeByTokens
- Buys, Sells, BuyVolume, SellVolume, Makers, TotalTradedVolume, PriceinUSD for solana token pair · Solana · DEXTradeByTokens