MCRT

Returns DEX trades on Ethereum and BNB Chain, where base currency is 0x4b82…1e4f, quote currency is 0xbb4c…095c and date since 2021-10-03: minute, base currency symbol, base currency address, base amount, quote currency symbol, quote currency address, quote amount and 4 more fields.

By gaurav · saved 21 December 2021 · Bitquery API v1

What it returns

Filters

The query


  query(
    $baseAddress: String
    $quoteAddress: String
    $from: ISO8601DateTime!
    $interval: Int
    $protocol: String
    $exchangeName: String
    $network: EthereumNetwork!
  ) {
    ethereum(network: $network) {
      dexTrades(
        protocol: { is: $protocol }
        baseCurrency: { is: $baseAddress }
        quoteCurrency: { is: $quoteAddress }
        date: { since:  $from }
        exchangeName: { is: $exchangeName }
        priceAsymmetry: { lt: 0.7 }
        any: [
          {tradeAmountUsd: { gt: 10 }},
          {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",
  "interval": 10,
  "baseAddress": "0x4b8285ab433d8f69cb48d5ad62b415ed1a221e4f",
  "quoteAddress": "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
  "network": "bsc"
}

Similar queries