COMP USD downfall
This API provides the latest USDT token price in USD for Ethereum blockchain using DEXs like Uniswap, Balancer. You can also get the price of USDT Token at any previous date or time. You can also specify a specific exchange to get the price from using the filter.
What it returns
- block height
- timestamp time
- base currency symbol
- quote currency symbol
- quote price
- quote amount
- base amount
- expression
- full name with ID
- address address
- annotation
Filters
- base currency is 0xc00e…6888
- quote currency is 0xc02a…6cc2
- date is 2022-06-22
The query
query get_token_price_in_usd($token: String) {
ethereum(network: ethereum) {
dexTrades(
baseCurrency: {is: $token}
quoteCurrency: {is: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"}
options: {desc: ["block.height"], limit: 1}
date: {in: "2022-06-22"}
) {
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": "0xc00e94Cb662C3520282E6f5717214004A7f26888"
}
Similar queries
- Latest Curve DEX swaps on Ethereum · Ethereum · DEXTrades
- Top Curve liquidity pools by 24h volume on Ethereum · Ethereum · DEXTrades
- STRN_TOKEN_MULTIPLE_DECIMALS_DEX_TRADES · Ethereum · DEXTrades
- USDT DECIMAL SHOWING 0 · Ethereum · DEXTrades
- Trades - 0xEE61159E8A72A08371c52D62c19Efd0C7914f917 · Ethereum · DEXTrades