Query DEX base / quote prices

Returns 10 DEX trades on Ethereum, sorted by time interval second, highest first: transaction hash, buy currency symbol, buy currency address, buy currency name, trade amount, sell currency symbol, sell currency address and 7 more fields.

By Nasho · saved 26 April 2021 · run 1 time · Bitquery API v1

What it returns

The query

query(
  $wallet: String
){
  ethereum(network: ethereum) {
    dexTrades(
      options: {
        limit: 10
        desc: "timeInterval.second"
      }
      any: [{txSender: {is: $wallet}}, {txTo: {is: $wallet}}]
    ) {
      transaction {
        hash
      }
      buyCurrency {
        symbol
        address
        name
      }
      tradeAmount(in: ETH)
      sellCurrency {
        symbol
        address
        name
      }
      buyAmount
      sellAmount
      date {
        date
      }
      timeInterval {
        second
      }
      gasValue
      gasPrice
    }
  }
}

Variables

{
  "wallet": "0xdc74846f63d13669e7b2c61f7a18a0288529779f"
}

Similar queries