historical price and historical volume
Historical data The Trading cube covers real time and roughly the last 30 days. For anything older, rebuild the same numbers from raw trades with DEXTradeByTokens. Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/ Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retenti
What it returns
- currency ID
- currency name
- currency symbol
- mean
- sum of volume USD
Filters
- token ID is bid:solana:9WHhgXJBGgxghkh5wAUWJFHVbnsRbonRYTnH2EChpump
- time duration is 1
The query
# Historical data
# The Trading cube covers real time and roughly the last 30 days. For
# anything older, rebuild the same numbers from raw trades with
# DEXTradeByTokens.
#
# Datasets: https://docs.bitquery.io/docs/graphql/dataset/archive/
# Retention: https://docs.bitquery.io/docs/graphql/data-coverage-retention/
#
{
Trading {
Tokens(
where: {Interval: {Time: {Duration: {eq: 1}}}, Block: {Time: {since_relative: {hours_ago: 24}}}, Token: {Id: {in: ["bid:solana:9WHhgXJBGgxghkh5wAUWJFHVbnsRbonRYTnH2EChpump"]}}}
) {
Currency {
Id
Name
Symbol
}
Price {
Average {
currentPrice: Mean(maximum: Block_Time)
H1Ago: Mean(
minimum: Block_Time
if: {Block: {Time: {since_relative: {hours_ago: 1}}}}
)
H4Ago: Mean(
minimum: Block_Time
if: {Block: {Time: {since_relative: {hours_ago: 4}}}}
)
H24Ago: Mean(
minimum: Block_Time
if: {Block: {Time: {since_relative: {hours_ago: 24}}}}
)
}
}
v1h: sum(of: Volume_Usd, if: {Block: {Time: {since_relative: {hours_ago: 1}}}})
v4h: sum(of: Volume_Usd, if: {Block: {Time: {since_relative: {hours_ago: 4}}}})
v24h: sum(of: Volume_Usd)
}
}
}
Similar queries
- Elysium latest token price in USD · Trading (all chains) · Tokens
- Elysium top tokens by USD volume, 24h · Trading (all chains) · Tokens
- save with commit · Trading (all chains) · Tokens
- arc mainnet minara ohlcv candles · Trading (all chains) · Tokens
- Arc Mainnet Trading: OHLCV candles for a token (v2) · Trading (all chains) · Tokens