PancakeSwap Trade History For Specific Token

Returns the latest 10 DEX trades on Ethereum and BNB Chain, where base currency is 0xbb4c…095c, quote currency is 0x2065…2261 and exchange name is Pancake or Pancake v2: transaction hash, address address, contract type, currency name, trade index, date date, unixtime and 11 more fields.

By Simon · saved 10 July 2022 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      options: {desc: "block.height", limit: 10}
      exchangeName: {in: ["Pancake", "Pancake v2"]}
      baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      quoteCurrency: {is: "0x2065e3bd318f155abe5ad6aa263596f197112261"}
      date: {}
    ) {
      transaction {
        hash
      }
      smartContract {
        address {
          address
        }
        contractType
        currency {
          name
        }
      }
      tradeIndex
      date {
        date(format: "yyyy-mm-dd")
      }
      block {
        timestamp {
          unixtime
        }
      }
      buyAmount
      buyAmountInUsd: buyAmount(in: USD)
      buyCurrency {
        symbol
        address
      }
      sellAmount
      sellAmountInUsd: sellAmount(in: USD)
      sellCurrency {
        symbol
        address
      }
      sellAmountInUsd: sellAmount(in: USD)
      tradeAmount(in: USD)
      transaction {
        gasValue
        gasPrice
        gas
      }
      price
    }
  }
}

Similar queries