Trade in a transaction

Returns the latest DEX trades on Ethereum, where tx hash is 0x72ed…066d, date since 2023-04-25 and date till 2023-04-27: iso8601, gas value, maker address, taker address, full name, base currency address, base currency name and 6 more fields.

By gaurav · saved 8 May 2023 · run 1 time · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "block.timestamp.time"}
      date: {since: $from, till: $till}
      txHash: {is: "0x72ed085f6dca6a8f3e3624f0c0e45c14e0208f458ff626e8c3a3030f02a8066d"}
    ) {
      block {
        timestamp {
          time: iso8601
        }
      }
      gasValue
      gasValueInUSD: gasValue(in: USD)
      maker {
        address
      }
      taker {
        address
      }
      exchange {
        fullName
      }
      baseCurrency {
        address
        name
      }
      quoteCurrency {
        address
        name
      }
      transaction {
        hash
        to {
          address
        }
      }
      baseAmount
      buyAmountInUSD: baseAmount(in: USD)
      quoteAmount
      sellAmountInUSD: quoteAmount(in: USD)
    }
  }
}

Variables

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

Similar queries