Added event streamer featuring a callback to handle received events.#295
Open
Quenos wants to merge 5 commits intotastyware:masterfrom
Open
Added event streamer featuring a callback to handle received events.#295Quenos wants to merge 5 commits intotastyware:masterfrom
Quenos wants to merge 5 commits intotastyware:masterfrom
Conversation
Member
|
It seems like this would be better added to DXLinkStreamer directly no? Just add the option for a callback to the subscribe function? |
Contributor
Author
|
@Graeme22 Or am I missing something? If not the PR can be closed W/O merge :) |
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
In streamer.py an event streamer has been added that instantiates a DXLinkStreamer starts listening to events of the given event type. When a new event is received a callback function is called with that event.
The reason to add this is that this function is a common pattern to work with the DXLinkStreamer and therefore deserves to be part of this SDK IMO.
Als an examples folder has been added showcasing the use of the event streamer as an application reference. This example has been used to test the implementation of the event streamer.
Related issue(s)
None
Pre-merge checklist
make lint)make test, make sure you haveTT_REFRESH,TT_SECRET, andTT_ACCOUNTenvironment variables set) - See description to check how it has been testedPlease note that, in order to pass the tests, you'll need to set up your Tastytrade credentials as repository secrets on your local fork. Read more at CONTRIBUTING.md.