Max, Min and Median of QuoteAmount with OHLC data of Ethereum

Returns 30000 DEX trades on Ethereum, where smart contract address is 0xba38…c898 and quote currency is 0xc02a…6cc2, sorted by time interval hour: hour, quote price, minimum of block, maximum of block, quote amount, base currency name, quote currency name and full name.

By Sayon · saved 31 August 2021 · run 3 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {limit: 30000, asc: "timeInterval.hour"}
      smartContractAddress: {is: "0xba38eca6dfdb92ec605c4281c3944fccd9dec898"}
      quoteCurrency: {in: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
    ) {
      timeInterval {
        hour(count: 1)
      }
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      min_quoteAmount: quoteAmount(in: USD, calculate: minimum)
      max_quoteAmount: quoteAmount(in: USD, calculate: maximum)
      median_quoteAmount: quoteAmount(in: USD, calculate: median)
      baseCurrency {
        name
      }
      quoteCurrency {
        name
      }
      exchange {
        fullName
      }
    }
  }
}

Similar queries