OHLC on bsc pancakeswap infinity

Returns 10 DEX trades by token on BNB Chain, where currency smart contract is 0x9dc4…1223, side currency smart contract is 0x55d3…7955 and side type is buy, sorted by block testfield, highest first: block time, sum of trade amount, trade price and count.

By Akshat · saved 5 December 2025 · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: bsc, dataset: realtime) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_testfield"}
      where: {Trade: {Currency: {SmartContract: {is: "0x9dc44ae5be187eca9e2a67e33f27a4c91cea1223"}}, Side: {Currency: {SmartContract: {is: "0x55d398326f99059ff775485246999027b3197955"}}, 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