polygon query

Returns 100 DEX trades on Ethereum and Polygon, where base currency is 0x2791…4174, quote currency is 0xc213…8e8f and exchange name is QuickSwap, sorted by time interval minute: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount and 2 more fields.

By gaurav · saved 8 February 2022 · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: matic) {
    dexTrades(
      options: {limit: 100, asc: "timeInterval.minute"}
      date: {since: "2022-02-01"}
      exchangeName: {in: ["QuickSwap"]}
      baseCurrency: {is: "0x2791bca1f2de4661ed88a30c99a7a9449aa84174"}
      quoteCurrency: {is: "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"}
    ) {
      timeInterval {
        minute(count: 1440)
      }
      baseCurrency {
        symbol
        address
      }
      baseAmount
      quoteCurrency {
        symbol
        address
      }
      quoteAmount
      quotePrice
      close_price: maximum(of: block, get: quote_price)
    }
  }
}

Similar queries