24hr change on multi currency in tron

Returns 3 DEX trades on Tron, where base currency is TR7NHq…Lj6t or TXL6rJ…8MRT, quote currency is TNUC9Q…jWFR and time till 2024-07-19, sorted by pfinal, highest first: base currency address, base currency symbol, quote currency address, quote currency symbol, minimum of block, maximum of block, expression and trade amount.

By gaurav · saved 19 October 2024 · run 2 times · Bitquery API v1

What it returns

Filters

The query

{
  tron {
    One_hr_Change: dexTrades(
      options: {desc: "pfinal", limitBy: {each: "baseCurrency.address", limit: 1}, limit: 3}
      baseCurrency: {in: ["TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "TXL6rJbvmjD46zeN1JssfgxvSo99qC8MRT"]}
      quoteCurrency: {is: "TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFR"}
      time: {till: "2024-07-19T11:00:00"}
    ) {
      baseCurrency {
        address
        symbol
      }
      quoteCurrency {
        address
        symbol
      }
      initialPrice: minimum(of: block, get: price)
      lastPrice: maximum(of: block, get: price)
      priceCalculation: expression(get: "lastPrice / initialPrice")
      pfinal: expression(get: "lastPrice / 100")
      tradeAmount(in: USD)
    }
  }
}

Similar queries