get tokentx

Returns the latest 100 DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4C…095c, quote currency is 0xe9e7…7d56, 0x55d3…7955 or 2 more and exchange name is Pancake or Pancake v2: transaction hash, block height, buy currency symbol, buy currency address, sell currency symbol, sell currency address, buy amount and 8 more fields.

By Hong · saved 29 December 2021 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 100, desc: "block.height"}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      quoteCurrency: {in: ["0xe9e7cea3dedca5984780bafc599bd69add087d56", "0x55d398326f99059ff775485246999027b3197955", "0x7130d2a12b9bcbfae4f2634d864a1ee1ce3ead9c", "0x2170ed0880ac9a755fd29b2688956bd959f933f8"]}
      time: {after: "2021-12-29T00:00:00+0700"}
      date: {since: "2021-12-29T00:00:00+0700"}
    ) {
      transaction {
        hash
      }
      block {
        height
      }
      buyCurrency {
        symbol
        address
      }
      sellCurrency {
        symbol
        address
      }
      buyAmount(calculate: maximum)
      sellAmount(calculate: maximum)
      any(of: time)
      exchange {
        name
      }
      tradeAmount(in: USD)
      side
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
    }
  }
}

Similar queries