Latest Price of a Token

Trades for a specific token on the Pancake DEX

Returns the latest DEX trade on Ethereum and BNB Chain, where buy currency is 0x58e7…3ec3, sell currency is 0xbb4c…095c and exchange name is Pancake or Pancake v2: transaction hash, address address, contract type, currency name, trade index, date date, block height and 10 more fields.

By Connor · saved 27 January 2022 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(options: {limit: 1, desc: ["block.height", "tradeIndex"]},
      date: {since: "2021-06-05"}
      buyCurrency: {is: "0x58e720cce069c9c74e9a7b56a21aeffd45f63ec3"}
      sellCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}
      exchangeName: {in: ["Pancake", "Pancake v2"]}) {
      transaction {
        hash
      }
      smartContract{
        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
      }
    }
  }
}

Similar queries