Price by Block Number

Returns DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4C…095c, quote currency is 0xe9e7…7D56 and exchange name is Pancake or Pancake v2: quote price, timestamp time, unixtime and block height.

By chewpanini · saved 8 April 2022 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      time: {between: ["2022-04-07T00:00:00.853958Z","2022-04-07T12:00:00.853958Z"]}
      baseCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      quoteCurrency: {is: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56"}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
    ) {
      price: quotePrice(calculate: average)
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
          unixtime
        }
        height
      }
    }
  }
}

Similar queries