OHLC-GHC-FAIL

This query fails because it handles too much data

Returns DEX trades on Ethereum and BNB Chain, where buy currency is 0x683f…bfe0 or 0xbb4c…095c and sell currency is 0x683f…bfe0 or 0xbb4c…095c, sorted by time interval second: second, buy currency symbol, buy currency address, sell currency symbol, sell currency address, buy amount, sell amount and 4 more fields.

By Kevin · saved 13 January 2022 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "timeInterval.second"}
      buyCurrency: {in: ["0x683fae4411249ca05243dfb919c20920f3f5bfe0", "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"]}
      sellCurrency: {in: ["0x683fae4411249ca05243dfb919c20920f3f5bfe0", "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"]}
    ) {
      timeInterval {
        second(count: 1)
      }
      buyCurrency {
        symbol
        address
      }
      sellCurrency {
        symbol
        address
      }
      buyAmount
      sellAmount
      trades: count
      maximum_price: price(calculate: maximum)
      minimum_price: price(calculate: minimum)
      open_price: minimum(of: block, get: price)
      close_price: maximum(of: block, get: price)
    }
  }
}

Similar queries