latest_price_Nova

Returns the latest DEX trade on Ethereum, where base currency is 0xd0b3…1a3d and quote currency is 0xc02a…6cc2: timestamp time, block height, trade index, protocol, full name, base amount, base currency address and 6 more fields.

By Omkar Acharekar · saved 28 September 2023 · run 4 times · Bitquery API v1

What it returns

Filters

The query

query ($network: EthereumNetwork!) {
  ethereum(network: $network) {
    dexTrades(
      baseCurrency: {is: "0xd0b3a986fff305854a7238a8e099cce1ced01a3d"}
      quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
      options: {desc: "block.height", limit: 1}
    ) {
      block {
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
        height
      }
      tradeIndex
      protocol
      exchange {
        fullName
      }
      baseAmount
      buy_amount_usd: baseAmount(in: USD)
      baseCurrency {
        address
        symbol
      }
      quoteAmount
      quoteAmountUSD: quoteAmount(in: USD)
      quoteCurrency {
        address
        symbol
      }
      quotePrice
      quotePriceCalculate: expression(get: "quoteAmount/baseAmount")
      USD: expression(get: "quoteAmountUSD/baseAmount")
    }
  }
}

Variables

{
  "limit": 10,
  "offset": 0,
  "network": "ethereum",
  "hash": "0xdb37a1d67deda93c9d9381c0d94d05352f245a4a0c351a0f9acd902a2f80f109"
}

Similar queries