Closed goodboy closed 5 years ago
I didn't include any of the undocumented services. When I get a chance I'll check the docs for the old version of the API and see if there's something we can do. It might also be a good idea to create a generic Subscription object that allows the user to add raw string services, fields etc. so they can experiment with different services.
@jeog amazing.
It might also be a good idea to create a generic Subscription object that allows the user to add raw string services, fields etc. so they can experiment with different services.
Sounds great. I sent an email to the api address to see what they had to say about it. I'll report back with anything useful.
Got a response back from them:
Thank you for your email. We will continue to update the Streamer documentation as time comes. In this particular case, the fields listed in each subsection are the services that you can subscribe to. For a request for streaming Level 2 on MSFT, as an example, here is your request:
requests": [
{
"service":"NASDAQ_BOOK",
"requestid":"3",
"command":"SUBS",
"account":userPrincipalsResponse.accounts[0].accountId,
"source":userPrincipalsResponse.streamerInfo.appId,
"parameters": {
"keys":"MSFT",
"fields":"0,1,2"
}
}
]
@jeog I assume this looks more familiar to you then to me ;)
Ok, the docs from the old API show the same fields, just a different format, so it looks like w/ some trial and error you can get that.
Hopefully, if I get some time this weekend, I can push a Raw/Generic Subscription that will allow for trying out all these undocumented services. Then whatever works can be added to the other subscription objects.
Added a raw subscription object so for the example they provided you would do:
sub = stream.RawSubscription( "NASDAQ_BOOK", "SUBS", {"keys":"MSFT", "fields":"0,1,2"} )
session = stream.StreamingSession( credentials, callback )
session.start( sub )
I got a good response from the server so should be good to go.
@jeog awesome. Sorry I didn't get back to you. Should be playing with this soon!
Hey I'm super curious if your library supports the book end point(s).
The streaming tutorial lists support but it seems undocumented?.
A brief search of the repo shows some enum defs but no code for making actual requests / setting up streams.
Any tips or insight is greatly appreciated. Cool project btw.