Price Index

ohlc query

Returns DEX trades on Ethereum and BNB Chain, where exchange address is 0xca14…0c73, time since 2022-02-06 and time till 2022-02-06, sorted by time interval minute, highest first: minute, base currency symbol, base currency address, quote currency symbol, quote currency address, quote amount, quote price and 2 more fields.

By test · saved 8 February 2022 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!, $baseAddress: String!, $connectorAddress: String!, $quoteAddress: String!, $exchange: String!, $since: ISO8601DateTime!, $till: ISO8601DateTime!, $interval: Int!) {
  ethereum(network: $network) {
    dexTrades(
      options: {desc: "timeInterval.minute"}
      time: {since: $since, till: $till}
      exchangeAddress: {is: $exchange}
      any: [{baseCurrency: {is: $baseAddress}, quoteCurrency: {is: $connectorAddress}}, {baseCurrency: {is: $connectorAddress}, quoteCurrency: {is: $quoteAddress}}]
      tradeAmountUsd: {gt: 10}
      priceAsymmetry: {lt: 0.7}
    ) {
      timeInterval {
        minute(count: $interval, format: "%Y-%m-%dT%H:%M:%SZ")
      }
      buyCurrency: baseCurrency {
        symbol
        address
      }
      sellCurrency: quoteCurrency {
        symbol
        address
      }
      volume: quoteAmount
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
    }
  }
}

Variables

{
  "network": "bsc",
  "exchange": "0xca143ce32fe78f1f7019d7d551a6402fc5350c73",
  "baseAddress": "0x5546600f77eda1dcf2e8817ef4d617382e7f71f5",
  "connectorAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "quoteAddress": "0xe9e7cea3dedca5984780bafc599bd69add087d56",
  "since": "2022-02-06T08:55:21.000Z",
  "till": "2022-02-06T16:25:21.000Z",
  "interval": 5
}

Similar queries