latest ohlc using date
Returns the latest 10 DEX trades by token on Ethereum, where side currency smart contract is 0xC02a…6Cc2, pair smart contract is 0xE4b8…49e8 and block date since 2024-12-12: block time, sum of trade amount in USD, price in USD, trade price and count.
What it returns
- block time
- sum of trade amount in USD
- price in USD
- trade price
- count
Filters
- side currency smart contract is 0xC02a…6Cc2
- pair smart contract is 0xE4b8…49e8
- block date since 2024-12-12
The query
query EVMTokenPrice($pairAddress: String!, $timeInterval: OLAP_DateTimeIntervalUnits!, $intervalCount: Int!, $limit: Int!) {
EVM(network: eth, dataset: combined) {
DEXTradeByTokens(
orderBy: {descendingByField: "Block_timestamp"}
where: {Trade: {Side: {Currency: {SmartContract: {is: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2"}}}, Dex: {Pair: {SmartContract: {is: $pairAddress}}}}, Block: {Date: {since: "2024-12-12"}}}
limit: {count: $limit}
) {
Block {
timestamp: Time(interval: {in: $timeInterval, count: $intervalCount})
}
volume: sum(of: Trade_AmountInUSD)
Trade {
high: PriceInUSD(maximum: Trade_PriceInUSD)
low: PriceInUSD(minimum: Trade_PriceInUSD)
open: PriceInUSD(minimum: Block_Number)
close: PriceInUSD(maximum: Block_Number)
closeEth: Price(maximum: Block_Number)
}
count
}
}
}
Variables
{
"pairAddress": "0xE4b8583cCB95b25737C016ac88E539D0605949e8",
"timeInterval": "minutes",
"intervalCount": 1,
"after": "2024-12-12",
"limit": 10
}
Similar queries
- CRV hourly OHLC on Curve - Ethereum · Ethereum · DEXTradeByTokens
- Top Metric liquidity pools by 24h volume on Ethereum · Ethereum · DEXTradeByTokens
- ATH of eth token · Ethereum · DEXTradeByTokens
- historical price and historical volume · Ethereum · DEXTradeByTokens
- topTraders EVM · Ethereum · DEXTradeByTokens