Price of multiple tokens in realtime
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: base, dataset: combined) archive full history combined archive + realtime in one result A
What it returns
- buy currency symbol
- buy price in USD
- buy price
- sell currency symbol
Filters
- buy currency smart contract is 0x9401…8631 or 0x04C0…150A
- sell currency smart contract is 0x4200…0006
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: base, 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 {
EVM(network: base, dataset: realtime) {
DEXTrades(
limitBy: {by:Trade_Buy_Currency_SmartContract count: 1}
orderBy: {descending: Block_Time}
where: {Trade: {Buy: {Currency: {SmartContract: {in: ["0x940181a94a35a4569e4529a3cdfb74e38fd98631","0x04C0599Ae5A44757c0af6F9eC3b93da8976c150A"]}}}, Sell: {Currency: {SmartContract: {is: "0x4200000000000000000000000000000000000006"}}}}, TransactionStatus: {Success: true}}
) {
Trade {
Buy {
Currency {
Symbol
}
Price_In_USD: PriceInUSD
Price_in_native_currency: Price
}
Sell {
Currency {
Symbol
}
}
}
}
}
}
Similar queries
- Zora Trades For A Wallet Up To A Block · Base · DEXTrades
- dex_trade_by_tx_base · Base · DEXTrades
- base dextrades · Base · DEXTrades
- trades · Ethereum · DEXTrades
- base_aerodrome_slipstream · Base · DEXTrades