Use time filter

Returns the latest 5 DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4c…095c, quote currency is 0xe9e7…7d56 and time since 2021-11-19: timestamp time, count and quote price.

By gaurav · saved 21 December 2021 · run 7 times · Bitquery API v1

What it returns

Filters

The query

query getPrices {
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 5, desc: "block.timestamp.time"}
      baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}
      tradeAmountUsd: {gt: 10}
      time: {since:"2021-11-19T13:42:00"  till: "2021-11-20T13:42:00"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      count
      quotePrice(calculate: median)
    }
  }
}

Similar queries