Ethereum_price

Returns one DEX trade on Ethereum, where quote currency is 0xdAC1…1ec7 and base currency is 0xC02a…6Cc2, sorted by block height transaction index, highest first: quote price, expression, block height, address address, base amount, base currency address, base currency symbol and 5 more fields.

By Omkar_BQ · saved 4 March 2024 · run 3 times · Bitquery API v1

What it returns

Filters

The query

{
  ethereum(network: ethereum) {
    dexTrades(
      options: {desc: ["block.height", "transaction.index"], limit: 1}
      quoteCurrency: {is: "0xdAC17F958D2ee523a2206206994597C13D831ec7"}
      baseCurrency: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}
    ) {
      quotePrice
      USDPrice: expression(get: "quoteAmountUSD / baseAmount")
      block {
        height
      }
      smartContract {
        address {
          address
        }
      }
      baseAmountUSD:baseAmount(in: USD)
      baseAmount
      baseCurrency {
        address
        symbol
      }
      quoteAmountUSD:quoteAmount(in: USD)
      quoteAmount
      quoteCurrency {
        address
        symbol
      }
      transaction {
        hash
        index
      }
    }
  }
}

Similar queries