User DEX Trades with tx hash

Returns the latest DEX trades on Ethereum, where tx sender is 0xaf95…e8c3, tx hash is 0x72ed…066d and date since 2023-04-25: iso8601, gas value, maker address, taker address, full name, buy currency address, sell currency address and 5 more fields.

By Thi Ngoc My Pham · saved 5 May 2023 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $address: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "block.timestamp.time", ascByInteger: "tradeIndex"}
      date: {since: $from, till: $till}
      txSender: {is: $address}
      txHash: {is: "0x72ed085f6dca6a8f3e3624f0c0e45c14e0208f458ff626e8c3a3030f02a8066d"}
    ) {
      block {
        timestamp {
          time: iso8601
        }
      }
      gasValue
      gasValueInUSD: gasValue(in: USD)
      maker {
        address
      }
      taker {
        address
      }
      exchange {
        fullName
      }
      buyCurrency {
        address
      }
      sellCurrency {
        address
      }
      transaction {
        hash
        to {
          address
        }
      }
      buyAmount
      buyAmountInUSD: buyAmount(in: USD)
      sellAmount
      sellAmountInUSD: sellAmount(in: USD)
      tradeIndex
    }
  }
}

Variables

{
  "address": "0xaf951f7a4aa4e2a033b034af0897273ed553e8c3",
	"from": "2023-04-25T12:45:14.115Z",
	"network": "ethereum",
	"till": "2023-04-27T08:45:14.115Z"
}

Similar queries