Price_HODL_

Returns the latest DEX trade on Ethereum, where quote currency is 0xc02a…6cc2 and base currency is 0x0215…04c7: expression, block height, trade index, base amount, base currency address, base currency symbol, quote amount and 2 more fields.

By Omkar Acharekar · saved 11 September 2023 · run 5 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "tradeIndex"], limit: 1}
      quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
      baseCurrency: {is: "0x021582ad6035424253ac10698b85aa326f6604c7"}
    ) {
      USDPrice: expression(get: "quoteAmountUSD / baseAmount")
      block {
        height
      }
      tradeIndex
      baseAmountUSD:baseAmount(in: USD)
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmountUSD:quoteAmount(in: USD)
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
    }
  }
}

Similar queries