quoteprice_in_usd
Returns the latest DEX trade on Ethereum, where base currency is 0xc02a…6cc2, quote currency is 0xfcf8…bc0a and exchange name is Uniswap or Uniswap v2: timestamp time, block height, quote currency address, quote currency name, quote currency symbol, quote price, base currency address and 5 more fields.
What it returns
- timestamp time
- block height
- quote currency address
- quote currency name
- quote currency symbol
- quote price
- base currency address
- base currency name
- base currency symbol
- base amount
- quote amount
- expression
Filters
- base currency is 0xc02a…6cc2
- quote currency is 0xfcf8…bc0a
- exchange name is Uniswap or Uniswap v2
- date is 2023-06-07
The query
query ($date: ISO8601DateTime!, $tokenIn: String, $tokenOut: String) {
ethereum(network: ethereum) {
dexTrades(
date: {is: $date}
exchangeName: {in: ["Uniswap", "Uniswap v2"]}
baseCurrency: {is: $tokenIn}
quoteCurrency: {is: $tokenOut}
options: {limit: 1, desc: "block.height"}
) {
block {
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
height
}
quoteCurrency {
address
name
symbol
}
quotePrice
baseCurrency {
address
name
symbol
}
baseAmountinUSD: baseAmount(in: USD)
quoteAmountinUSD: quoteAmount(in: USD)
expression(get: "quoteAmountinUSD/baseAmountinUSD")
}
}
}
Variables
{
"date": "2023-06-07",
"tokenIn": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"tokenOut": "0xfcf8eda095e37a41e002e266daad7efc1579bc0a"
}
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