SWAP QUESTION fixed

Returns the latest 100 DEX trades on Ethereum, where exchange name is Uniswap and protocol is Uniswap v2 or Uniswap v3: transaction hash, gas value, gas price, gas, buy amount, buy currency symbol, buy currency address and 5 more fields.

By gaurav · saved 30 July 2022 · run 10 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $address: String!, $limit: Int!, $offset: Int!) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "block.timestamp.time", limit: $limit, offset: $offset}
      any: [{txSender: {is: $address}}, {taker: {is: $address}}]
      exchangeName: {is: "Uniswap"}
      protocol: {in: ["Uniswap v2", "Uniswap v3"]}
    ) {
      transaction {
        hash
        gasValue
        gasPrice
        gas
      }
      buyAmount
      buyCurrency {
        symbol
        address
      }
      sellAmount
      sellCurrency {
        symbol
        address
      }
      protocol
      block {
        timestamp {
          time
        }
      }
    }
  }
}

Variables

{
  "network": "ethereum",
  "address": "0xabded70836f3377e4ae9460b1aad5809536f048a",
  "limit": 100,
  "offset": 0
}

Similar queries