Latest Trades of a Token pair

Returns the latest DEX trade on Ethereum and BNB Chain, where base currency is 0xbb4C…095c, quote currency is 0x5020…3a01 and date since 2021-07-29: block height, timestamp time, trade index, protocol, buy amount, buy currency address, buy currency symbol and 4 more fields.

By haxtuf · saved 2 September 2021 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {limit: 1, desc: ["block.timestamp.time"]}
      baseCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
      quoteCurrency: {is: "0x5020f345679a1951e1cc6a2a9000418965103a01"}
      date: {since: "2021-07-29"}
    ) {
      block{
        height
        timestamp{
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      tradeIndex
      protocol
      buyAmount
      buyCurrency {
        address
        symbol
      }
      sellAmount
      sellCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Similar queries