Save all data available from the ws stream.

This commit is contained in:
Kalzu Rekku
2026-07-16 21:16:43 +03:00
parent e22dc05352
commit 7579c68524
6 changed files with 248 additions and 49 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ func (a *Aggregator) ProcessTick(tick Tick) {
defer a.mu.Unlock()
// Determine which 5-second bucket this tick belongs to
tickBucket := (tick.Timestamp / bucketDurationMs) * bucketDurationMs
tickBucket := (tick.TradeTS / bucketDurationMs) * bucketDurationMs
if a.currentBucket == 0 {
// First tick ever — initialize the bucket