SWAP QUESTION

Returns the latest 3 DEX trades on Ethereum, where maker or taker is 0xabde…048a, 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 Joel · saved 28 July 2022 · run 4 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}
      makerOrTaker: {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": 3, "offset": 3}

Similar queries