AAVE OHLC Data

Returns 10 DEX trades on Ethereum, where base currency is 0x7fc6…dae9, quote currency is 0xC02a…6Cc2 and time after 2023-06-04, sorted by time interval minute, highest first: minute, base currency name, quote currency name, quote amount, expression, quote price, minimum of block and maximum of block.

By gaurav · saved 28 June 2023 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"}
      quoteCurrency: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}
      time: {after: "2023-06-04T17:15:00"}
      options: {limit: 10, desc: "timeInterval.minute"}
    ) {
      timeInterval {
        minute(format: "%FT%TZ", count: 15)
      }
      baseCurrency {
        name
      }
      quoteCurrency {
        name
      }
      quoteAmount
      volume: quoteAmount(in: USD)
      wethPriceinUSD: expression(get: "volume / quoteAmount")
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      highUSD: expression(get: "wethPriceinUSD * high")
      lowUSD: expression(get: "wethPriceinUSD * low")
      openUSD: expression(get: "wethPriceinUSD * open")
      closeUSD: expression(get: "wethPriceinUSD * close")
    }
  }
}

Similar queries