Evm Historical ohlc - query

Returns 100 DEX trades by token on Ethereum, where currency smart contract is 0xA12C…f4f3 and trade price asymmetry is below 0.1, sorted by block testfield, highest first: block time, sum of trade side amount in USD, price in USD and count.

By Akshat · saved 12 March 2026 · run 1 time · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: eth, dataset: combined) {
    DEXTradeByTokens(
      orderBy: { descendingByField: "Block_testfield" }
      where: {
        Trade: {
          Currency: {
            SmartContract: { is: "0xA12CC123ba206d4031D1c7f6223D1C2Ec249f4f3" }
          }
          PriceAsymmetry: { lt: 0.1 }
        }
      }
      limit: { count: 100 }
    ) {
      Block {
        testfield: Time(interval: { in: minutes, count: 1 })
      }
      volume: sum(of: Trade_Side_AmountInUSD)
      Trade {
        high: PriceInUSD(maximum: Trade_PriceInUSD)
        low: PriceInUSD(minimum: Trade_PriceInUSD)
        open: PriceInUSD(minimum: Block_Number)
        close: PriceInUSD(maximum: Block_Number)
      }
      trade_count: count
    }
  }
}

Similar queries