Correct

Returns the latest 10000 DEX trades on Ethereum and Polygon, where sell currency is 0x2791…4174, buy currency is 0x7ceb…f619 and exchange name is Uniswap v3: buy currency address, buy currency symbol, buy currency name, sell currency address, sell currency symbol, sell currency name, sell amount and 3 more fields.

By Omkar Acharekar · saved 25 May 2023 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: matic) {
    dexTrades(
      options: {limit: 10000, offset: 0, desc: "time"}
      exchangeName: {is: "Uniswap v3"}
      time: {since: "2023-05-22T10:25:00", till: "2023-05-23T10:25:00"}
      sellCurrency: {is: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"}
      buyCurrency: {is: "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"}
    ) {
      buyCurrency {
        address
        symbol
        name
      }
      sellCurrency {
        address
        symbol
        name
      }
      sellAmount
      buyAmount
      closePrice: maximum(of: block, get: price)
      time: maximum(of: block, get: time)
      tradeAmount(in: USD)
    }
  }
}

Similar queries