Uniswap OHLC data (5 minute candle , HOKK/WETH)

Returns DEX trades on Ethereum, where base currency is 0xc40a…6c4e, quote currency is 0xc02a…6cc2 and exchange name is Uniswap, sorted by time interval minute: minute, quote amount, quote price, minimum of block and maximum of block.

By Paul · saved 7 September 2021 · Bitquery API v1

What it returns

Filters

The query

{
ethereum(network: ethereum) {
    dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: "2021-09-07T07:23:21.000Z", till: "2021-09-08T02:35:21.000Z"}
      exchangeName: {is: "Uniswap"}
      baseCurrency: {is: "0xc40af1e4fecfa05ce6bab79dcd8b373d2e436c4e"},
      quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"},
      tradeAmountUsd: {gt: 1}
    ) 
    {
      timeInterval {
        minute(count: 10, format: "%Y-%m-%dT%H:%M:%SZ")  
      }
      volume: quoteAmount
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price) 
    }
  }
}

Similar queries