Percentage price change for a meme rush 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: EVM(network: bsc, dataset: combined) archive full history combined archive + realtime in one result Ar
What it returns
- currency name
- currency symbol
- smart contract
- price in USD
- calculate
Filters
- currency smart contract is 0x4444…5701
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: bsc, 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($currency: String) {
EVM(network: bsc) {
DEXTradeByTokens(
where: {
Trade: {
Currency: {
SmartContract: {is: $currency}
},
Success: true
},
Block: {
Time: {since_relative: {hours_ago: 24}}
}
}
) {
Trade {
Currency {
Name
Symbol
SmartContract
}
price_24hr: PriceInUSD(minimum: Block_Time)
price_1hr: PriceInUSD(if: {Block: {Time: {is_relative: {hours_ago:1}}}})
price_5min: PriceInUSD(if: {Block: {Time: {is_relative: {minutes_ago:1}}}})
current: PriceInUSD
}
change_24hr: calculate(expression: "( $Trade_current - $Trade_price_24hr ) / $Trade_price_24hr * 100")
change_1hr: calculate(expression: "( $Trade_current - $Trade_price_1hr ) / $Trade_price_1hr * 100")
change_5min: calculate(expression: "( $Trade_current - $Trade_price_5min ) / $Trade_price_5min * 100")
}
}
}
Variables
{
"currency": "0x44442202ff27ee2297c128d0c1ae43a0fbb35701"
}
Similar queries
- bStocks 3am: QQQB 30-day DEX volume · BNB Chain · DEXTradeByTokens
- bStocks 3am: tokenized Tesla 30-day volume · BNB Chain · DEXTradeByTokens
- bsc token ohlcv · BNB Chain · DEXTradeByTokens
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- KTI_primeiros_trades · BNB Chain · DEXTradeByTokens