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: eth, dataset: combined) archive full history combined archive + realtime in one result Ar
What it returns
- buy currency symbol
- buy price in USD
- buy price
- sell currency symbol
Filters
- buy currency smart contract is 0xaaeE…1C7a, 0x2260…C599 or 1 more
- sell currency smart contract is 0xC02a…6Cc2
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: eth, 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: eth, dataset: realtime) {
DEXTrades(
limitBy: {by:Trade_Buy_Currency_SmartContract count: 1}
orderBy: {descending: Block_Time}
where: {Trade: {Buy: {Currency: {SmartContract: {in: ["0xaaeE1A9723aaDB7afA2810263653A34bA2C21C7a","0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599","0xB8c77482e45F1F44dE1745F52C74426C631bDD52"]}}}, Sell: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}}, TransactionStatus: {Success: true}}
) {
Trade {
Buy {
Currency {
Symbol
}
Price_In_USD: PriceInUSD
Price_in_native_currency: Price
}
Sell {
Currency {
Symbol
}
}
}
}
}
}
Similar queries
- Latest Curve DEX swaps on Ethereum · Ethereum · DEXTrades
- Top Curve liquidity pools by 24h volume on Ethereum · Ethereum · DEXTrades
- STRN_TOKEN_MULTIPLE_DECIMALS_DEX_TRADES · Ethereum · DEXTrades
- USDT DECIMAL SHOWING 0 · Ethereum · DEXTrades
- Trades - 0xEE61159E8A72A08371c52D62c19Efd0C7914f917 · Ethereum · DEXTrades