Get Multiple Pancake Prices

Returns DEX trades on Ethereum and BNB Chain, where quote currency is 0xfb82…2ffe, 0xedf0…f21a or 1 more and base currency is 0xbb4C…095c, sorted by block height transaction index, highest first: block height, timestamp time, transaction index, base currency symbol, quote currency symbol and quote price.

By secretshiba · saved 6 June 2022 · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $addresses: [String!], $baseCurrency: String!, $limit: Int!) {
  ethereum(network: $network) {
    dexTrades(
      quoteCurrency: {in: $addresses}
      baseCurrency: {is: $baseCurrency}
      options: {desc: ["block.height", "transaction.index"], limitBy: {each: "baseCurrency.symbol", limit: $limit}}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      transaction {
        index
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
    }
  }
}

Variables

{
  "addresses": [
  	"0xfb82876a27c2d38a3e7bc4591ace7f1a45e32ffe",
  	"0xedf0c420bc3b92b961c6ec411cc810ca81f5f21a",
    "0xe9e7cea3dedca5984780bafc599bd69add087d56"
  ],
  "network": "bsc",
  "limit": 2,
  "baseCurrency": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"
}

Similar queries