percentage price change of assets

Returns 100 DEX trades on Ethereum and BNB Chain, where quote currency is 0x55d3…7955, sell currency is 0xbb4C…095c and time since 2024-12-04, sorted by final, highest first: hour, base currency name, base currency address, quote currency name, quote currency address, minimum of block, maximum of block and expression.

By Akshay · saved 4 December 2024 · run 3 times · Bitquery API v1

What it returns

Filters

The query

query getLegacyTokenCandles($limit: Int, $from: ISO8601DateTime) {
  ethereum(network: bsc) {
    dexTrades(
      quoteCurrency: {is: "0x55d398326f99059ff775485246999027b3197955"}
      time: {since: $from}
      options: {limit: $limit, desc: "final", limitBy: {each: "baseCurrency.address, quoteCurrency.address", limit: 1}}
      priceAsymmetry: {lt: 0.001}
      sellCurrency: {is: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c"}
    ) {
      timeInterval {
        hour(count: 24)
      }
      baseCurrency {
        name
        address
      }
      quoteCurrency {
        name
        address
      }
      open_price: minimum(of: block, get: quote_price)
      close_price: maximum(of: block, get: quote_price)
      open_price_time: minimum(of: block, get: time)
      close_price_time: maximum(of: block, get: time)
      diff: expression(get: "close_price - open_price")
      div: expression(get: "diff / open_price")
      final: expression(get: "div * 100")
    }
  }
}

Variables

{
  "network": "bsc",
  "from": "2024-12-04T00:00:00",
  "limit": 100
}

Similar queries