DWR/WBNB OHLC data

Returns DEX trades on Ethereum and BNB Chain, where base currency is 0x5f49…5b8c, quote currency is 0xbb4c…095c and exchange name is Pancake or Pancake v2, sorted by time interval minute: minute, quote price, minimum of block and maximum of block.

By gaurav · saved 24 November 2021 · run 5 times · Bitquery API v1

What it returns

Filters

The query

query GetCandleData($baseCurrency: String!, $since: ISO8601DateTime, $till: ISO8601DateTime, $quoteCurrency: String!, $window: Int) {
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "timeInterval.minute"}
      time: {since: $since, before: $till}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: $baseCurrency}
      quoteCurrency: {is: $quoteCurrency}
    ) {
      timeInterval {
        minute(count: $window, format: "%Y-%m-%dT%H:%M:%SZ")
      }
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
    }
  }
}

Variables

{
  "baseCurrency": "0x5f49f9024d5dec860b110eca79e5b805c14b5b8c",
  "quoteCurrency": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "since": "2021-08-28T08:00:00.00",
  "till": "2021-08-28T08:10:00.00",
  "window": 1
}

Similar queries