Latest price in USD on ethereum
Returns the latest DEX trade on Ethereum, where buy currency is 0x2890…5aa6: timestamp time, block height, trade index, protocol, full name, buy amount, buy currency symbol and 3 more fields.
What it returns
- timestamp time
- block height
- trade index
- protocol
- full name
- buy amount
- buy currency symbol
- sell amount
- sell currency symbol
- expression
Filters
- buy currency is 0x2890…5aa6
The query
{
ethereum(network: ethereum) {
dexTrades(
options: {desc: ["block.height", "tradeIndex"], limit: 1, offset: 0}
buyCurrency: {is: "0x2890df158d76e584877a1d17a85fea3aeeb85aa6"}
) {
block {
timestamp {
time(format: "%Y-%m-%d %H:%M:%S")
}
height
}
tradeIndex
protocol
exchange {
fullName
}
buyAmount
buyCurrency {
symbol
}
buy_amount_usd: buyAmount(in: USD)
sellAmount
sellCurrency {
symbol
}
sell_amount_usd: sellAmount(in: USD)
priceInUSD: expression(get: "buy_amount_usd / buyAmount")
}
}
}
Variables
{
"limit": 10,
"offset": 0,
"network": "ethereum",
"from": "2023-06-28",
"till": "2023-06-28T23:59:59",
"dateFormat": "%Y-%m-%d"
}
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