Candle data

Returns DEX trades on Ethereum and BNB Chain, where base currency is 0x0e09…ce82, quote currency is 0xbb4C…095c and exchange name is Pancake or Pancake v2, sorted by time interval minute: minute, base currency symbol, base currency address, quote currency symbol, quote currency address, trade amount, count and 3 more fields.

By gaurav · saved 26 July 2021 · run 3 times · Bitquery API v1

What it returns

Filters

The query

query GetCandleData($baseCurrency: String!, $since: ISO8601DateTime, $quoteCurrency: String!, $exchangeName: [String!], $minTrade: Float, $window: Int) {
  ethereum(network: bsc) {
    dexTrades(
      options: {asc: "timeInterval.minute"}
      date: {since: $since}
      exchangeName: {in: $exchangeName}
      baseCurrency: {is: $baseCurrency}
      quoteCurrency: {is: $quoteCurrency}
      tradeAmountUsd: {gt: $minTrade}
    ) {
      timeInterval {
        minute(count: $window, format: "%Y-%m-%dT%H:%M:%SZ")
      }
      baseCurrency {
        symbol
        address
      }
      quoteCurrency {
        symbol
        address
      }
      tradeAmount(in: USD)
      trades: count
      quotePrice
      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

{
  "baseCurrency": "0x0e09fabb73bd3ade0a17ecc321fd13a19e81ce82",
  "since": "2021-07-21T00:00:00Z",
  "till": "2021-07-26T23:59:59Z",
  "quoteCurrency": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
  "exchangeName": [
    "Pancake",
    "Pancake v2"
  ],
  "minTrade": 1,
  "window": 1
}

Similar queries