Repository navigation
Fix missing quotes when subscribing to more than 30 symbols - #41
Merged
Merged
Conversation
Coinbase allows 30 level2 streams per web socket connection, the rest are rejected with 'too many L2 streams requested in a single session', so those symbols got trades but no quotes. The rejection was logged at debug level. - Spread data subscriptions across multiple connections, 30 symbols each, using BrokerageMultiWebSocketSubscriptionManager. The main connection keeps the heartbeats and user channels - USD and USDC pairs share the same stream, when they land on different connections follow a single one so data is not handled twice - Track sequence numbers per connection - Log web socket error messages as errors Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Coinbase allows 30
level2streams per web socket connection. Subscriptions above it are rejected withtoo many L2 streams requested in a single session, so those symbols streamed trades but never quotes. The rejection was only logged at debug level.BrokerageMultiWebSocketSubscriptionManager. The main connection keeps theheartbeatsanduserchannelsMotivation and Context
Live deployments with more than 30 symbols were missing quote data for most of them.
How Has This Been Tested?
StreamsQuotesForMoreSymbolsThanASingleConnectionAllows: subscribes quotes for 60 symbols and asserts they stream, passes liveSubscribeOnDifferentUSDTickersstreams BTCUSD and BTCUSDC quotes and trades without duplicates. It can time out waiting for a BTCUSDT trade, which is illiquid. Added the received data to its assert message🤖 Generated with Claude Code