altangent / ccxws

WebSocket client for 38 cryptocurrency exchanges
MIT License
619 stars 187 forks source link

Bitfinex heartbeat events are ignored, making sequenceId impossible to validate #258

Closed evan-coygo closed 2 years ago

evan-coygo commented 3 years ago

The ws sequenceId is shared across all channels on Bitfinex and if you're subscribed to l2 or l3 book you need to receive the sequenceId of heartbeat events, even if it's a heartbeat for the ticker channel. This only really shows up on lower activity markets since heartbeats don't get sent unless a channel doesn't have activity for 15 seconds.

In its current form validating order books w/sequenceIds is impossible because of this.