query eth
query
Returns DEX trades by token on Ethereum, where currency smart contract is 0xf747…c90e, pair smart contract is 0x8aef…3ea3 and block time since 2024-11-20, sorted by block OHLC interval, highest first: block time, sum of trade amount in USD and price in USD.
What it returns
- block time
- sum of trade amount in USD
- price in USD
Filters
- currency smart contract is 0xf747…c90e
- pair smart contract is 0x8aef…3ea3
- block time since 2024-11-20
- block time till 2024-11-29
The query
query ($network: evm_network, $poolAddress: String, $fromTime: DateTime, $toTime: DateTime, $intervalIn: OLAP_DateTimeIntervalUnits, $intervalCount: Int) {
EVM(network: $network, dataset: combined) {
DEXTradeByTokens(
orderBy: {descendingByField: "Block_OHLC_interval"}
where: {Trade: {Currency: {SmartContract: {is: "0xf74751c07c92b668f02527d0e1384ee6d68ac90e"}}, Dex: {Pair: {SmartContract: {is: $poolAddress}}}}, Block: {Time: {since: $fromTime, till: $toTime}}}
) {
Block {
OHLC_interval: Time(interval: {in: $intervalIn, 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)
}
}
}
}
Variables
{
"network": "eth",
"poolAddress": "0x8aef2b7b3a5cc059c1451f48d9dd734af2f03ea3",
"fromTime": "2024-11-20T00:00:00.000Z",
"toTime": "2024-11-29T00:00:00.000Z",
"intervalIn": "minutes",
"intervalCount": "30"
}
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