Latest Trades of a token in 2 exchanges

Returns the latest DEX trade on Ethereum and BNB Chain, where base currency is 0xe9e7…7D56, exchange name is Balancer and exchange name is Pancake: quote price, timestamp time, block height, trade index, full name, address address, annotation and 7 more fields.

By Divyasshree N · saved 14 April 2023 · run 4 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    balancer_trade: dexTrades(
      options: { desc: ["block.height", "tradeIndex"], limit: 1 }
      baseCurrency: { is: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56" }
      exchangeName: { is: "Balancer" }
    ) {
      quotePrice
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
    pancake_trade: dexTrades(
      options: { desc: ["block.height", "tradeIndex"], limit: 1 }
      baseCurrency: { is: "0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56" }
      exchangeName: { is: "Pancake" }
    ) {
      quotePrice
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Similar queries