OHLC query

Returns the latest 10 DEX trades by token on BNB Chain, where side currency smart contract is 0x9641…a817 and currency smart contract is 0xe9e7…7d56: block time, sum of trade amount, trade price and count.

By gaurav · saved 20 December 2023 · run 51 times · Bitquery API v2

What it returns

Filters

The query

{
  EVM(dataset: combined, network: bsc) {
    DEXTradeByTokens(
      limit: {count: 10}
      orderBy: {descending: Block_Time}
      where: {Trade: {Side: {Currency: {SmartContract: {is: "0x96412902aa9aff61e13f085e70d3152c6ef2a817"}}}, Currency: {SmartContract: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}}}}
    ) {
      Block {
        Time(interval: {in: minutes, count: 10})
      }
      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