OHLC on BSC

Returns 10 DEX trades by token on BNB Chain, where currency smart contract is 0xe545…0142, side currency smart contract is 0x55d3…7955 and trade price asymmetry is below 0.1, sorted by block testfield, highest first: block time, sum of trade amount, trade price and count.

By gaurav · saved 15 May 2025 · run 2 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(network: bsc, dataset: realtime) {
    DEXTradeByTokens(
      orderBy: {descendingByField: "Block_testfield"}
      where: {Trade: {Currency: {SmartContract: {is: "0xe54596f617dfd127fae2a3876cc92d4a1b4c0142"}}, Side: {Currency: {SmartContract: {is: "0x55d398326f99059fF775485246999027B3197955"}}}, PriceAsymmetry: {lt: 0.1}}}
      limit: {count: 10}
    ) {
      Block {
        testfield: Time(interval: {in: minutes, count: 5})
      }
      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