testdex

Returns the latest 10 DEX trades on Ethereum, where exchange name is Uniswap or SushiSwap, date before 2024-12-31 and date after 2023-06-01: transaction hash, transaction index, address address, contract type, currency name, trade index, timestamp time and 11 more fields.

By datax · saved 18 January 2024 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($limit: Int!, $network: EthereumNetwork!, $wallet: String!) {
  ethereum(network: $network) {
    dexTrades(
      options: {limit: $limit, desc: "block.height"}
      exchangeName: {in: ["Uniswap", "SushiSwap"]}
      date: {before: "2024-12-31", after: "2023-06-01"}
      any: [{txSender: {is: $wallet}}, {taker: {is: $wallet}}]
    ) {
      transaction {
        hash
        index
      }
      smartContract {
        address {
          address
        }
        contractType
        currency {
          name
        }
      }
      tradeIndex
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        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
      }
    }
  }
}

Variables

{ "network": "ethereum",
  "limit": 10,
  "wallet": "0x8eF57238Cd4178EEd96Cd30a13CBc7448925328e"}

Similar queries