Copy of Copy of New Query
Returns DEX trades by token on Ethereum, where side currency smart contract is 0xa0b8…eb48, currency smart contract is 0xc02a…6cc2 and block time since 2025-07-04, sorted by block time: block time, quantile of trade price in USD, average of trade price in USD and sum of trade side amount in USD.
What it returns
- block time
- quantile of trade price in USD
- average of trade price in USD
- sum of trade side amount in USD
Filters
- side currency smart contract is 0xa0b8…eb48
- currency smart contract is 0xc02a…6cc2
- block time since 2025-07-04
- block time till 2025-07-07
- side amount is above 0
The query
query tradingViewPairs($network: evm_network, $dataset: dataset_arg_enum, $interval: Int, $token: String, $base: String, $from: DateTime, $to: DateTime) {
EVM(network: $network, dataset: $dataset) {
DEXTradeByTokens(
orderBy: {ascendingByField: "Block_Time"}
where: {TransactionStatus: {Success: true}, Trade: {Side: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $token}}}, Currency: {SmartContract: {is: $base}}, Success: true}, Block: {Time: {since: $from, till: $to}}}
) {
Block {
Time(interval: {count: $interval, in: seconds})
}
min: quantile(of: Trade_PriceInUSD, level: 0.1)
max: quantile(of: Trade_PriceInUSD, level: 0.9)
close: average(of: Trade_PriceInUSD)
open: average(of: Trade_PriceInUSD)
volume: sum(of: Trade_Side_AmountInUSD)
}
}
}
Variables
{
"network": "eth",
"base": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"token": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"time_ago": "2025-07-04T08:33:18Z",
"dataset": "realtime",
"interval": 60,
"from": "2025-07-04T08:34:19.000Z",
"to": "2025-07-07T08:34:19.000Z"
}
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