All Pairs of USDC and WETH on Uniswap v3

Returns the latest 10 DEX trades on Ethereum, where buy currency is 0xa0b8…eb48, sell currency is 0xc02a…6cc2 and exchange name is Uniswap: timestamp time, block height, trade index, protocol, full name, address address, annotation and 7 more fields.

By gaurav · saved 13 June 2023 · run 9 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $exchange: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: $limit, offset: $offset, limitBy: {each: "smartContract.address.address", limit: 1}}
      date: {since: $from, till: $till}
      buyCurrency: {is: "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"}
      sellCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
      exchangeName: {is: $exchange}
      protocol: {is: "Uniswap v3"}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      smartContract {
        address {
          address
          annotation
        }
      }
      buyAmount
      buy_amount_usd: buyAmount(in: USD)
      buyCurrency {
        address
        symbol
      }
      sellAmount
      sell_amount_usd: sellAmount(in: USD)
      sellCurrency {
        address
        symbol
      }
      transaction {
        hash
      }
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "exchange": "Uniswap",
  "from": "2023-06-06",
  "till": "2023-06-13T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries