PancakeSwap Trade History For Specific Token

Returns the latest DEX trades on Ethereum and bsc_testnet, where base currency is 0x4a15…5376 and quote currency is 0xaB1a…e814: transaction hash, address address, contract type, currency name, trade index, date date, block height and 14 more fields.

By bozhidar · saved 7 January 2024 · run 13 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc_testnet) {
    dexTrades(
      options: {desc: "block.height"}
      baseCurrency: {is: "0x4a151eCA3D277DC5Bb542c37A3Bd9fB89e6B5376"}
      quoteCurrency: {is: "0xaB1a4d4f1D656d2450692D237fdD6C7f9146e814"}
    ) {
      transaction {
        hash
      }
      smartContract(smartContractAddress: {}) {
        address {
          address
        }
        contractType
        currency {
          name
        }
      }
      tradeIndex
      date {
        date
      }
      block {
        height
      }
      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
      }
      quotePrice(calculate: maximum)
      quoteCurrency {
        name
      }
      quoteAmount(calculate: maximum)
      price(calculate: maximum)
    }
  }
}

Similar queries