iEthereum price in HEX

This API provides the latest iEthereum token price in Hex for Ethereum blockchain using DEXs like Uniswap, Balancer. You can also get the price of iEthereum Token at any previous date or time. You can also specify a specific exchange to get the price from using the filter.

By Knive Spiel · saved 1 November 2024 · run 2 times · Bitquery API v1

What it returns

Filters

The query

query get_token_price_in_usd($token: String) {
  ethereum(network: ethereum) {
    dexTrades(
      baseCurrency: {is: $token}
      quoteCurrency: {is: "0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39"}
      options: {desc: ["block.height"], limit: 1}
    ) {
      block {
        height
        timestamp {
          time(format: "%Y-%m-%d %H:%M:%S")
        }
      }
      baseCurrency {
        symbol
      }
      quoteCurrency {
        symbol
      }
      quotePrice
      quoteAmountInUSD: quoteAmount(in: USD)
      baseAmount
      quotePriceInUSD: expression(get: "quoteAmountInUSD / baseAmount")
      exchange {
        fullNameWithId
        address {
          address
          annotation
        }
      }
    }
  }
}

Variables

{
  "token": "0x859a9C0b44cb7066D956a958B0b82e54C9e44b4B"
}

Similar queries