OHLC on BASE pancakeswap infinity
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
- block time
- sum of trade amount
- trade price
- count
Filters
- currency smart contract is 0x22af…6f3b
- side currency smart contract is 0x4200…0006
- side type is buy
- DEX protocol name is pancakeswap_infinity
- trade price asymmetry is below 0.1
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/
#
{
EVM(network: base, dataset: realtime) {
DEXTradeByTokens(
orderBy: {descendingByField: "Block_testfield"}
where: {Trade: {Currency: {SmartContract: {is: "0x22af33fe49fd1fa80c7149773dde5890d3c76f3b"}}, Side: {Currency: {SmartContract: {is: "0x4200000000000000000000000000000000000006"}}, Type: {is: buy}}, PriceAsymmetry: {lt: 0.1}, Dex: {ProtocolName: {is: "pancakeswap_infinity"}}}}
limit: {count: 10}
) {
Block {
testfield: Time(interval: {in: hours, count: 1})
}
volume: sum(of: Trade_Amount)
Trade {
high: Price(maximum: Trade_Price)
low: Price(minimum: Trade_Price)
open: Price(minimum: Block_Number)
close: Price(maximum: Block_Number)
}
count
}
}
}
Similar queries
- Coinbase stock tokens: DEX trading on Base, Sep 5 to Oct 4 2026 · Base · DEXTradeByTokens
- Coinbase stock tokens: DEX trading on Base in August 2026 · Base · DEXTradeByTokens
- optimized query to get pools data · Ethereum · DEXTradeByTokens
- AfricaCryptoChainx · Ethereum · DEXTradeByTokens
- top pools of a token · Base · DEXTradeByTokens