Ribbon finance OHLC

Returns 6 DEX trades on Ethereum, where base currency is 0x6123…fa6b, quote currency is 0xdac1…1ec7 and time since 2024-01-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 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {limit: 6, asc: "timeInterval.minute"}
      time: {since: "2024-01-01T17:00:00Z", till: "2024-03-05T18:00:00Z"}
      baseCurrency: {is: "0x6123b0049f904d730db3c36a31167d9d4121fa6b"}
      quoteCurrency: {is: "0xdac17f958d2ee523a2206206994597c13d831ec7"}
    ) {
      timeInterval {
        minute(count: 10)
      }
      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