Save all data available from the ws stream.
This commit is contained in:
+1
-1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user