ohlc

Returns 10 DEX trades on Ethereum, where base currency is 0xb569…8b05, quote currency is 0xdAC1…1ec7 and time since 2018-01-13, sorted by time interval year, highest first: year, base currency name, quote currency name, quote price, minimum of block and maximum of block.

By gaurav · saved 22 November 2023 · run 6 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: "0xb569e1739a452585ce799ef3b0c606a4f0e28b05"}
      quoteCurrency: {is: "0xdAC17F958D2ee523a2206206994597C13D831ec7"}
      time: {since: "2018-01-13T00:00:00Z", till: "2023-06-20T00:00:00Z"}
      priceAsymmetry: {lt: 1}
      tradeAmountUsd: {gt: 5000}
      options: {limit: 10, desc: "timeInterval.year"}
    ) {
      timeInterval {
        year(count: 5)
      }
      baseCurrency {
        name
      }
      quoteCurrency {
        name
      }
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      openTime: minimum(of: block, get: time)
      closeTime: maximum(of: block, get: time)
    }
  }
}

Similar queries