Token's Price in USDT using WBNB as mediator

Returns DEX trades on Ethereum and BNB Chain, where date since 2021-05-19, sorted by trade index block timestamp time, highest first: second, base currency symbol, base currency address, timestamp time, block height, trade index, base amount and 8 more fields.

By gaurav · saved 19 May 2021 · run 1 time · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: bsc) {
    dexTrades(
      any: [{baseCurrency: {is: "0xb6d053e260d410eac02ea28755696f90a8ecca2b"}, quoteCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}}, {baseCurrency: {is: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c"}, quoteCurrency: {is: "0xe9e7cea3dedca5984780bafc599bd69add087d56"}}]
      date: {since: "2021-05-19T18:05:00.000Z"}
      options: {desc: ["tradeIndex", "block.timestamp.time"], limitBy: {each: "baseCurrency.symbol", limit: 1}}
    ) {
      timeInterval{
        second(count: 1)
      }
      baseCurrency {
        symbol
        address
      }
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      buyAmount: baseAmount
      buyAmountInUsd: baseAmount
      quoteCurrency {
        symbol
        address
      }
      sellAmountInUsd: quoteAmount
      tradeAmount(in: USD)
      volume: quoteAmount
      trades: count
      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