Polygon Price Pair Historical DEX Lookup

Price Pair Historical Lookup

Returns DEX trades on Ethereum and Polygon, where base currency is 0x2791…4174, quote currency is 0x2d72…9c8a or 0xa1c5…6fd4 and date since 2022-03-06: exchange name, minute, base currency name, quote currency name and quote price.

By JA · saved 7 April 2022 · run 14 times · Bitquery API v1

What it returns

Filters

The query

query fetchHistoricalPrice($network: EthereumNetwork!, $baseAddress: String!, $quoteAddresses: [String!]!, $since: ISO8601DateTime!, $interval: Int!) {
  ethereum(network: $network) {
    dexTrades(
      date: {since: $since}
      baseCurrency: {is: $baseAddress}
      quoteCurrency: {in: $quoteAddresses}
      
    ) {
      exchange {
        name
      }
      timeInterval {
        minute(format: "%FT%TZ", count: $interval)
      }
      baseCurrency {
        name
      }
      quoteCurrency {
        name
      }
      price: quotePrice(calculate: average)
    }
  }
}

Variables

{
  "network": "matic",
  "baseAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
  "quoteAddresses": [
    "0x2d72a97a31dc920db03330780d30074626e39c8a",
    "0xa1c57f48f0deb89f569dfbe6e2b7f46d33606fd4"
  ],
  "since": "2022-03-06T00:00:00Z",
  "interval": 10
}

Similar queries