OHLC on BSC V2

Returns 10 DEX trades by token on BNB Chain, where currency smart contract is 0xe545…0142, side currency smart contract is 0x55d3…7955 and block date since 2025-05-13, sorted by block time interval, highest first: block time, sum of trade amount, trade price and count.

By sunlight · 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_time_interval"}
      where: {Trade: {Currency: {SmartContract: {is: "0xe54596f617dfd127fae2a3876cc92d4a1b4c0142"}}, Side: {Currency: {SmartContract: {is: "0x55d398326f99059fF775485246999027B3197955"}}}, PriceAsymmetry: {lt: 0.1}}, Block: {Date: {since: "2025-05-13"}}}
      limit: {count: 10}
    ) {
      Block {
        time_interval: 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