weth-usdt-ohlc-draft
Streams the latest 10 DEX trades by token on Ethereum as they happen, where DEX smart contract is 0x0d4a…1852 and side currency symbol is WETH: block time, sum of trade amount, trade price and count.
What it returns
- block time
- sum of trade amount
- trade price
- count
Filters
- DEX smart contract is 0x0d4a…1852
- side currency symbol is WETH
The subscription
subscription OHLCSub($pool: String, $base: String) {
EVM(network: eth, trigger_on: head) {
DEXTradeByTokens(
orderBy: {descendingByField: "Block_Time"}
limit: {count: 10}
where: {Trade: {Dex: {SmartContract: {is: $pool}}, Success: true, Side: {Currency: {Symbol: {is: $base}}}}}
) {
Block {
Time(interval: {in: minutes, count: 5})
}
volume: sum(of: Trade_Amount)
Trade {
high: Price(maximum: Trade_Price)
low: Price(minimum: Trade_Price)
open: Price(minimum: Block_Time)
close: Price(maximum: Block_Time)
}
count
}
}
}
Variables
{
"pool": "0x0d4a11d5eeaac28ec3f61d100daf4d40471f1852",
"base": "WETH"
}
Similar queries
- Stablecoin Depeg tracking Stream for evm · Ethereum · DEXTradeByTokens
- realtime trades EVM -subscription · Ethereum · DEXTradeByTokens
- EVM chain currency details stream · Ethereum · DEXTradeByTokens
- Real time price stream for tokens on Ethereum · Ethereum · DEXTradeByTokens
- Top Bought/Sold/Trending/Volatility Tokens on Eth · Ethereum · DEXTradeByTokens