query dextrades

Returns DEX trades on Ethereum and BNB Chain, where date since 2022-07-25: minute, base currency symbol, quote currency symbol, quote amount, quote price, minimum of block and maximum of block.

By gaurav · saved 3 August 2022 · run 7 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      any: [{baseCurrency: {is: "0x7b8779e01d117ec7e220f8299a6f93672e8eae23"}, quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}, {baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}, quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}}]
      date: {since: "2022-07-25"}
    ) {
      timeInterval {
        minute(format: "%FT%TZ", count: 15)
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      value: quoteAmount(in: USD)
      median: quotePrice(calculate: median)
      high: quotePrice(calculate: maximum)
      low: quotePrice(calculate: minimum)
      open: minimum(of: block, get: quote_price)
      close: maximum(of: block, get: quote_price)
    }
  }
}

Similar queries