Skip to content

fix(bybit): normalize L2_BOOK callback timestamp using timestamp_norm…#1083

Merged
bmoscon merged 1 commit intobmoscon:masterfrom
otomarukanta:fix_bybit_ts
May 25, 2025
Merged

fix(bybit): normalize L2_BOOK callback timestamp using timestamp_norm…#1083
bmoscon merged 1 commit intobmoscon:masterfrom
otomarukanta:fix_bybit_ts

Conversation

@otomarukanta
Copy link
Copy Markdown
Contributor

Background

The L2_BOOK callback for the Bybit exchange was using a raw integer conversion (int(msg['ts'])) for the timestamp. This could lead to inconsistent units (seconds vs milliseconds) in backend processing.

What Changed

  • Updated the timestamp argument passed to self.book_callback to use self.timestamp_normalize(int(msg['ts'])) instead of the raw integer value.
  • By routing all timestamps through timestamp_normalize, we now correctly handle both seconds- and milliseconds-based inputs.

@bmoscon bmoscon merged commit 71a985c into bmoscon:master May 25, 2025
2 of 5 checks passed
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.

2 participants