Get BNB Prices for Multiple Tokens on BSC Pancake & Pancake v2

Returns 3 DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4C…095c, quote currency is 0xd699…143b, 0xfb82…2ffe or 1 more and exchange name is Pancake or Pancake v2, sorted by quote currency symbol: quote currency symbol, quote currency name, quote currency address, quote price, maximum of block and minimum of block.

By secretshiba · saved 6 June 2022 · run 8 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    count0: dexTrades(
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      options: {limit: 3, asc: "quoteCurrency.symbol"}
      baseCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      quoteCurrency: {in: ["0xd69959a34730311521ab9d31a38b343818a1143b", "0xfb82876a27c2d38a3e7bc4591ace7f1a45e32ffe", "0xdfe6891ce8e5a5c7cf54ffde406a6c2c54145f71"]}
    ) {
      quoteCurrency {
        symbol
        name
        address
      }
      quotePrice
      lastPrice: quotePrice(calculate: anyLast)
      closePrice: maximum(of: block get: quote_price)
      openPrice: minimum(of: block get: quote_price)
    }
  }
}

Similar queries