myown
Trying new things
Streams DEX trades by token on Tron as they happen, where currency smart contract is TM418q…sKJw, block time since 2024-12-23 and trade amount is above 0, sorted by block time: block time, price in USD, quantile of trade price in USD and sum of trade price in USD.
What it returns
- block time
- price in USD
- quantile of trade price in USD
- sum of trade price in USD
Filters
- currency smart contract is TM418q…sKJw
- block time since 2024-12-23
- trade amount is above 0
The subscription
subscription TokenOHLC($token: String, $time_ago: DateTime) {
Tron {
DEXTradeByTokens(
orderBy: {ascendingByField: "Block_Time"}
where: {Trade: {Amount: {gt: "0"}, Currency: {SmartContract: {is: $token}}}, Transaction: {Result: {Success: true}, Fee: {}}, Block: {Time: {since: $time_ago}}}
) {
Block {
Time
}
Trade {
close: PriceInUSD(maximum: Trade_PriceInUSD)
}
min: quantile(of: Trade_PriceInUSD, level: 0.05)
max: quantile(of: Trade_PriceInUSD, level: 0.95)
volume: sum(of: Trade_PriceInUSD, selectWhere: {})
}
}
}
Variables
{
"token": "TM418qpSkiqyeKdkKKb7YcmogazjQdsKJw",
"time_ago": "2024-12-23T05:46:38Z"
}
Similar queries
- Track price of a tron token · Tron · DEXTradeByTokens
- Get realtime mempool trades of a specific token · Tron · DEXTradeByTokens
- Get realtime Trades of a specific token on Sunpump · Tron · DEXTradeByTokens
- Subscribe to Sun Pump Latest Trades · Tron · DEXTradeByTokens
- Tron Token OHLC · Tron · DEXTradeByTokens