all tokens price in one query

Returns the latest DEX trades on Ethereum and BNB Chain, where quote currency is 0xbb4c…095c, exchange name is Pancake or Pancake v2 and time since 2022-08-22: base currency address, minimum of block, maximum of block, quote currency address and timestamp time.

By gaurav · saved 24 August 2022 · run 44 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    list1: dexTrades(
      options: {limitBy: {each: "baseCurrency.address", limit: 1}, desc: ["block.timestamp.time"]}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      quoteCurrency: {in: ["0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"]}
      time: {since: "2022-08-22T00:00:00"}
      tradeAmountUsd: {gt: 10}
      priceAsymmetry: {lt: 0.5}
    ) {
      baseCurrency {
        address
      }
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
      quoteCurrency {
        address
      }
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
    }
  }
}

Similar queries