OHLC_check

Returns 10 DEX trades on Ethereum, where base currency is 0x6982…1933, quote currency is 0xc02a…6cc2 and time since 2023-07-30, sorted by time interval minute, highest first: minute, quote currency address, quote price, minimum of date, maximum of date, trade amount and count.

By Omkar Acharekar · saved 19 August 2023 · run 3 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: "0x6982508145454ce325ddbe47a25d4ec3d2311933"}
      time: {since: "2023-07-30T09:05:00", till: "2023-07-30T09:30:00"}
      options: {limit: 10, desc: "timeInterval.minute"}
      quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
      tradeAmountUsd: {gt: 10}
      priceAsymmetry: {lt: 0.01}
    ) {
      timeInterval {
        minute(count: 5)
      }
      sellCurrency: quoteCurrency {
        address
      }
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: date, get: quote_price)
      close: maximum(of: date, get: quote_price)
      tradeAmount(calculate: sum, in: ETH)
      count
    }
  }
}

Similar queries