Ohlc query

Returns one DEX trade on Ethereum and BNB Chain, where base currency is 0xbb4c…095c, quote currency is 0xe9e7…7d56 and date since 2022-01-01, sorted by time interval hour: hour, base currency symbol, base currency address, quote currency symbol, quote currency address, trade amount, count and 3 more fields.

By gaurav · saved 22 March 2024 · run 11 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "timeInterval.hour", limit: 1}
      date: {since: "2022-01-01", till: "2022-01-02"}
      baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
    ) {
      timeInterval {
        hour(count: 1, format: "%Y-%m-%dT%H:%M:%SZ")
      }
      baseCurrency {
        symbol
        address
      }
      quoteCurrency {
        symbol
        address
      }
      tradeAmount(in: USD)
      trades: count
      quotePrice
      maximum_price: quotePrice(calculate: maximum)
      minimum_price: quotePrice(calculate: minimum)
      opening_price: minimum(of: block, get: quote_price)
      closing_price: maximum(of: block, get: quote_price)
    }
  }
}

Similar queries