dex api query

Returns the latest 20 DEX trades on Ethereum and BNB Chain, where base currency is 0x67fe…2a6e, exchange name is Pancake or Pancake v2 and date after 2022-06-01: transaction hash, block height, buy currency symbol, buy currency address, sell currency symbol, sell currency address, trade index and 5 more fields.

By gaurav · saved 5 May 2022 · run 160 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 20, desc: ["block.height", "tradeIndex"]}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0x67fe403a75d871b992143fa15474f542a7892a6e"}
      date: {after: "2022-06-01"}
    ) {
      transaction {
        hash
      }
      block {
        height
      }
      buyCurrency {
        symbol
        address
      }
      sellCurrency {
        symbol
        address
      }
      tradeIndex
      buyAmount(calculate: maximum)
      sellAmount(calculate: maximum)
      any(of: time)
      exchange {
        fullName
      }
      tradeAmount(in: USD)
    }
  }
}

Similar queries