-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add streaming endpoints for DEEP, Last and TOPS. #32
Open
husafan
wants to merge
26
commits into
timpalpant:master
Choose a base branch
from
husafan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
The SocketioClient will be responsible for negotiating a web socket connection and streaming results.
This should work for JSON responses as well as the only difference is they come one at a time and do not have a length prefix.
This component is responsible for performing the handshake and returning an initialized websocket connection.
Multiple threads can receive incoming message copies from the Websocket connection. Also, multiple threads can safely call WriteMessage.
The namespace is responsible for translating between arbitrary incoming messages for a given SocketIO endpoint and a specific iex message type, such as TOPS. It is also responsible for forwarding the decoded messages to all concerned listeners. Lastly, it filters out messages that given listeners are not concerned with. All this allows multiplexing of endpoint subscriptions over the same SocketIO connection. Also simplifies encoding to handle only messages of known formats rather than trying to handle arbitrary structs in a consistent manner. Adds a subUnsubMsgFactory function type for generating subscribe and unsubscribe messages for symbols across the given endpoint types.
PacketData contains the standard SocketIO info.
It turns out the connection can be initialized with two GET requests. Also added an example demonstrating an IEX SocketIO negotiation and added cookie support to the default client.
Replace the public API with callbacks. Also, simplify the namespace by removing "Connections."
Messages from IEX uppercase symbol strings. Also add a quick example.
Because the DEEP endpoint only allows subscribing to one symbol at a time, this allows all code paths to share the same logic rather than special-casing DEEP.
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.
Adds a socketio package defining a SocketIO IEX Client.
The client multiplexes over a single SocketIO connection with IEX. It defines methods for getting namespaces corresponding three streaming endpoints: deep, last and tops. Multiple handlers can be attached to each namespace using the #SubscribeTo method, which takes in a handler and a variadic list of exchange symbols being subscribed to.
There is no documentation at the moment, but there are a couple of examples.
fixes #1