Skip to content

fix(lighter): query Coinalyze from now-25h to catch delayed hourly buckets - #1975

Merged
Flotapponnier merged 1 commit into
devfrom
fix/lighter-cz-lookback
Aug 16, 2026
Merged

fix(lighter): query Coinalyze from now-25h to catch delayed hourly buckets#1975
Flotapponnier merged 1 commit into
devfrom
fix/lighter-cz-lookback

Conversation

@Flotapponnier

Copy link
Copy Markdown
Collaborator

Summary

  • Coinalyze publishes completed hourly buckets ~1h after the hour ends
  • Previous code queried from sinceMs (high-water mark), so by the time a bucket was available the window had already moved past it
  • Fix: always query from now-25h on every tick; SeenSet dedup prevents double-counting, runner cutoffMs filter still prunes events older than 24h
  • Also widens the fetchHourlyCloses window to match the new query range

Test plan

  • All existing unit tests pass (go test ./...)
  • Lighter should now show non-zero liq rate once Coinalyze has data for the current day

@Flotapponnier
Flotapponnier merged commit da8db92 into dev Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant