Populate NewsTick with its originating contract#214
Open
mahimn01 wants to merge 4 commits into
Open
Conversation
Constructed to support both poetry and uv at the same time currently. Fixes ib-api-reloaded#204
tzdata should always just be the newest we can pull; there's no sense in keeping older versions through time. Fixes ib-api-reloaded#209 Fixes ib-api-reloaded#210
apparently pandas doesn't build under pypy reliably, so avoid it from installing automatically in incompatible environments.
tickNews was receiving the market-data reqId as `_reqId` (unused), so emitted news headlines had no way to signal which symbol they belonged to when more than one subscription was streaming news at once. Look up the reqId in `reqId2Ticker` (falling back to `_reqId2Contract`) and attach a `Contract.recreate(...)` snapshot to the `NewsTick`. Fixes ib-api-reloaded#110
mattsta
pushed a commit
that referenced
this pull request
May 1, 2026
tickNews was receiving the market-data reqId as `_reqId` (unused), so emitted news headlines had no way to signal which symbol they belonged to when more than one subscription was streaming news at once. Look up the reqId in `reqId2Ticker` (falling back to `_reqId2Contract`) and attach a `Contract.recreate(...)` snapshot to the `NewsTick`. Fixes #110 Fixes #214
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.
Fixes #110.
tickNewswas receiving the market-data reqId as_reqId(unused), soNewsTickevents came out with no way to tell which symbol a headline belonged to when a consumer had multiple streaming-news subscriptions active at once.A new
_snapshotContractForReqIdhelper resolves the reqId viareqId2Ticker(falling back to_reqId2Contract), andtickNewsattaches aContract.recreate(...)snapshot to the emittedNewsTick. Includes a unit test covering the happy path, the_reqId2Contractfallback, and the no-op path when the reqId is unknown.Matches the shape we converged on in the thread, with
reqIdomitted for consistency with the other tick-style events.