Test OHLC Data

Returns 2235 DEX trades on Ethereum and BNB Chain, where base currency is 0xb27a…97cc, quote currency is 0xbb4C…095c and exchange name is Pancake v2, sorted by time interval minute, highest first: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote price and 4 more fields.

By test · saved 6 December 2021 · Bitquery API v1

What it returns

Filters

The query

query ($baseAddress: String!, $quoteAddress: String!, $to: ISO8601DateTime!, $interval: Int, $limit: Int) {
          ethereum(network: bsc) {
            dexTrades(
              options: {limit: $limit, desc: "timeInterval.minute"}
              baseCurrency: {is: $baseAddress},
              quoteCurrency: {is: $quoteAddress},
              date: {till: $to}
              exchangeName: { is: "Pancake v2" }
            ) {
              timeInterval {
                minute(format: "%FT%TZ", count: $interval)
              }
              buyCurrency: baseCurrency {
                symbol
                address
              }
              buyAmount: baseAmount
              buyAmountInUsd: baseAmount
              sellCurrency: quoteCurrency {
                symbol
                address
              }
              averageQuotePrice: quotePrice(calculate: average)
              volume: quoteAmount
              trades: count
              high: quotePrice(calculate: maximum)
              low: quotePrice(calculate: minimum)
              open: minimum(of: block, get: quote_price)
              close: maximum(of: block, get: quote_price)
            }
          }
        }

Variables

{
  "baseAddress": "0xb27adaffb9fea1801459a1a81b17218288c097cc",
	"quoteAddress": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
  "to": "2021-12-06T14:00:00.000Z",
  "limit": 2235,
  "interval": 10
}

Similar queries