TV SPE

trading view chart

Returns DEX trades on Ethereum and BNB Chain, where base currency is 0xdbaa…bc38, quote currency is 0xbb4C…095c and exchange name is Pancake: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount and 4 more fields.

By ThomSPE · saved 14 January 2022 · run 1 time · Bitquery API v1

What it returns

Filters

The query


  query(
    $baseAddress: String
    $quoteAddress: String
    $from: ISO8601DateTime!
    $to: ISO8601DateTime!
    $interval: Int
    $exchangeName: String
  ) {
    ethereum(network: bsc) {
      dexTrades(
        baseCurrency: { is: $baseAddress }
        quoteCurrency: { is: $quoteAddress }
        date: { between: [$from, $to] }
        exchangeName: { is: $exchangeName }
        priceAsymmetry: { lt: 0.7 }
        any: [
          {tradeAmountUsd: { gt: 0.00001 }},
          {tradeAmountUsd: { is: 0 }}
        ]
      ) {
        timeInterval {
          minute(format:"%FT%TZ", count: $interval)
        }
        buyCurrency: baseCurrency {
          symbol
          address
        }
        buyAmount: baseAmount
        sellCurrency: quoteCurrency {
          symbol
          address
        }
        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

{
  "from": "2021-10-03T00:15:33+03:00",
  "to": "2021-11-16T00:00:00+02:00",
  "interval": 15,
  "baseAddress": "0xdbaaa36b347d56b77ce0e36f050fceebbf9fbc38",
  "quoteAddress": "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
  "exchangeName": "Pancake"
}

Similar queries