token price

Returns the latest DEX trade on Ethereum and BNB Chain, where base currency is 0x599b…12A4, quote currency is 0xbb4C…095c and exchange name is Pancake or Pancake v2: trade index, block height and quote price.

By Cyc201843! · saved 24 June 2022 · run 33 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0x599beec263FA6eA35055011967597B259FC012A4"}
      quoteCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
    ) {
      tradeIndex
      block {
        height
      }
      quotePrice
    }
  }
}

Similar queries