QueryMarketStats

Get Market Stats between two dates

Returns DEX trades on Ethereum, where base currency is 0x7866…B4F4, trade amount USD is above 10 and price asymmetry is below 0.05: base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount, count and 3 more fields.

By Jao · saved 16 April 2021 · run 18 times · Bitquery API v1

What it returns

Filters

The query

query GET_MARKETS_STATS($base: String!, $dates: [ISO8601DateTime!]) {
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: $base}
      date: {between: $dates}
      tradeAmountUsd: {gt: 10}
      priceAsymmetry: {lt: 0.05}
    ) {
      baseCurrency {
        symbol
        address
      }
      baseAmount
      baseAmountUSD: baseAmount(in: USD)
      quoteCurrency {
        symbol
        address
      }
      quoteAmount
      quoteAmountUSD: quoteAmount(in: USD)
      trades: count
      maximum_price: quotePrice(calculate: maximum)
      minimum_price: quotePrice(calculate: minimum)
      open_price: minimum(of: block, get: quote_price)
      close_price: maximum(of: block, get: quote_price)
    }
  }
}

Variables

{
  "base": "0x7866E48C74CbFB8183cd1a929cd9b95a7a5CB4F4",
  "dates": ["2021-01-01", "2021-03-01"]
}

Similar queries