Repository navigation
Fix Gemini emitting trades for symbols not subscribed to TRADES - #1151
Merged
bmoscon merged 1 commit intoOct 18, 2026
Merged
Conversation
bmoscon
requested changes
Oct 18, 2026
Owner
There was a problem hiding this comment.
i dont want 100 lines of AI test code for a 4 line fix. Remove this
Contributor
Author
There was a problem hiding this comment.
Removed, the fix is unchanged.
Gemini's l2 subscription covers every symbol across all channels and carries trades, both as live trade messages and batched inside l2_updates. _book already drops messages for symbols that weren't subscribed to L2_BOOK, but _trade and _trade_batch had no such check, so a symbol subscribed only to L2_BOOK also produced TRADES callbacks.
wavebyrd
force-pushed
the
fix/gemini-trades-subscription-filter
branch
from
October 18, 2026 23:18
068e085 to
4a81a4d
Compare
bmoscon
approved these changes
Oct 18, 2026
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 of code - what bug does this fix / what feature does this add?
Gemini's single
l2subscription carries trades for every subscribed symbol, so a symbol subscribed only toL2_BOOKalso producedTRADEScallbacks._book()already skips symbols that aren't in its subscription; this adds the same check to_trade()and_trade_batch().