OHLC data 101

Returns 400 DEX trades on Ethereum and BNB Chain, where base currency is 0x0e09…ce82, quote currency is 0xbb4c…095c and exchange name is Pancake v2, sorted by time interval second: second, exchange name, block height, transaction hash, side, base currency symbol, base currency address and 8 more fields.

By gaurav · saved 1 April 2022 · run 9 times · Bitquery API v1

What it returns

Filters

The query

{
    ethereum(network: bsc) {
      dexTrades(
        options: {limit: 400, asc: "timeInterval.second"}
        exchangeName: {is: "Pancake v2"}
        baseCurrency: {is: "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82"}
        quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
        time: {after: "2021-11-10T09:00:00.000Z" }
        tradeAmountUsd:{gt: 10}
      ) {
        timeInterval{
          second(count:  1, format: "%Y-%m-%dT%H:%M:%SZ")
        }
        exchange {
          name
        }
        block {
          height
        }
        transaction {
          hash
        }
        side
        baseCurrency {
          symbol
          address
        }
        baseAmount
        quoteCurrency {
          symbol
          address
        }
        quoteAmount
        quotePrice
        tradeAmount(in: USD)
        median: quotePrice(calculate: median)
        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)
      }
    }
  }

Similar queries