Returns
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Show Properties
Arguments
subscription {
onDetailedStatsUpdated(
pairId: "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149"
tokenOfInterest: token0
) {
pairId
tokenOfInterest
statsType
stats_min5 {
windowSize
timestamp
endTimestamp
transactions {
change
currentValue
previousValue
}
volume {
change
currentValue
previousValue
}
buys {
change
currentValue
previousValue
}
sells {
change
currentValue
previousValue
}
buyers {
change
currentValue
previousValue
}
sellers {
change
currentValue
previousValue
}
}
stats_hour1 {
windowSize
timestamp
endTimestamp
transactions {
change
currentValue
previousValue
}
volume {
change
currentValue
previousValue
}
}
}
}
{
"data": {
"onDetailedStatsUpdated": {
"pairId": "BGm1tav58oGcsQJehL9WXBFXF7D27vZsKefj4xJKD5Y:1399811149",
"tokenOfInterest": "token0",
"statsType": "UNFILTERED",
"stats_min5": {
"windowSize": "min5",
"timestamp": 1769561431,
"endTimestamp": 1769561732,
"transactions": {
"change": -0.38095238095238093,
"currentValue": 13,
"previousValue": 21
},
"volume": {
"change": -0.984327,
"currentValue": "533",
"previousValue": "34008"
},
"buys": {
"change": -0.631578947368421,
"currentValue": 7,
"previousValue": 19
},
"sells": {
"change": 2,
"currentValue": 6,
"previousValue": 2
},
"buyers": {
"change": -0.46153846153846156,
"currentValue": 7,
"previousValue": 13
},
"sellers": {
"change": 0.5,
"currentValue": 3,
"previousValue": 2
}
},
"stats_hour1": {
"windowSize": "hour1",
"timestamp": 1769558131,
"endTimestamp": 1769561732,
"transactions": {
"change": 0.5,
"currentValue": 150,
"previousValue": 100
},
"volume": {
"change": 0.465108,
"currentValue": "172014",
"previousValue": "117407"
}
}
}
}
}
Usage Guidelines
- Subscribe using
pairId(formatpairAddress:networkId) andtokenOfInterest(token0ortoken1) - Stats are provided across multiple time windows:
stats_min5,stats_hour1,stats_hour4,stats_hour12,stats_day1 - Each metric includes
currentValue,previousValue, andchange(percent change as a decimal) for easy comparison - Use
bucketson any metric for granular breakdowns within the window (e.g., per-minute data within the 5-minute window) - Available metrics:
transactions,volume,buys,sells,buyers,sellers,traders,buyVolume,sellVolume - Updates are streamed in real-time as trading activity changes the stats
Troubleshooting Tips
What's the difference between tokenOfInterest and quoteToken?
What's the difference between tokenOfInterest and quoteToken?
onDetailedStatsUpdated uses tokenOfInterest, while onBarsUpdated and onEventsCreated use quoteToken. Both accept token0 or token1.What does the change field represent?
What does the change field represent?
change is the percent change between currentValue and previousValue, expressed as a decimal. For example, 0.25 means a 25% increase, and -0.5 means a 50% decrease.How do buckets work?
How do buckets work?
stats_min5 has 5 one-minute buckets, and stats_hour1 has 12 five-minute buckets. The buckets field on the parent returns the start/end timestamps for each bucket, and the buckets field on each metric returns the aggregated values per bucket.When should I use this vs onBarsUpdated?
When should I use this vs onBarsUpdated?
onDetailedStatsUpdated for trading activity stats (transaction counts, buyer/seller counts, volume breakdowns with change percentages). Use onBarsUpdated for OHLCV price candlestick data. They complement each other — stats for activity, bars for price.