RAMP OHLC

Returns 6 DEX trades on Ethereum, where base currency is 0x33d0…ed9f, quote currency is 0xc02a…6cc2 and time since 2024-03-01, sorted by time interval minute: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount and 5 more fields.

By Sascha Mayr · saved 5 March 2024 · run 6 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {limit: 6, asc: "timeInterval.minute"}
      time: {since: "2024-03-01T17:00:00Z", till: "2024-03-04T18:00:00Z"}
      baseCurrency: {is: "0x33d0568941c0c64ff7e0fb4fba0b11bd37deed9f"}
      quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
    ) {
      timeInterval {
        minute(count: 1)
      }
      baseCurrency {
        symbol
        address
      }
      baseAmount
      baseAmountInUSD: baseAmount(in: USD)
      quoteCurrency {
        symbol
        address
      }
      quoteAmount
      quoteAmountInUSD: quoteAmount(in: USD)
      trades: count
      quotePrice
      average_price: quotePrice(calculate: average)
      maximum_price: quotePrice(calculate: maximum)
      minimum_price: quotePrice(calculate: minimum)
      open_price: minimum(of: block, get: quote_price)
      close_price: maximum(of: block, get: quote_price)
      averagePriceInUSD: expression(get: "quoteAmountInUSD/baseAmount")
    }
  }
}

Similar queries