Uniswap V3 Trading Pairs on Polygon

Run this query to get trading pairs of Uniswap V3 on Polygon and get the total number of trades along with Median price and Last price for a defined duration.

By Sangam Bharti · saved 31 October 2023 · run 17 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $limit: Int!, $offset: Int!, $protocol: String!, $from: ISO8601DateTime, $till: ISO8601DateTime) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "count", limit: $limit, offset: $offset}
      date: {since: $from, till: $till}
      protocol: {is: $protocol}
    ) {
      sellCurrency {
        symbol
        address
      }
      sellAmount
      sell_amount_usd: sellAmount(in: USD)
      buyCurrency {
        symbol
        address
      }
      buyAmount
      buy_amount_usd: buyAmount(in: USD)
      count
      median_price: price(calculate: median)
      last_price: maximum(of: block, get: price)
      dates: count(uniq: dates)
      started: minimum(of: date)
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "matic",
  "protocol": "Uniswap v3",
  "from": "2023-10-24",
  "till": "2023-10-31T23:59:59",
  "dateFormat": "%Y-%m-%d"
}

Similar queries