tastytrade: Megathread: Streamer issues, DXFeed licensing, missing event types & symbols

Hi folks, I wanted to let everyone know about some developments that will affect a lot of users of the SDK.

Recently, a lot of users have been having issues with the streamer (#135, #137, #141) It turns out this is due to some changes that have been implemented upstream in the API. For a bit of background reading see the Javascript SDK’s page: tastytrade/tastytrade-api-js#7, tastytrade/tastytrade-api-js#9, tastytrade/tastytrade-api-js#40.

Long story short, there ~are~ were two types of streamers supported in this SDK, the DXFeed and the DXLink streamer. DXFeed was an older protocol which now appears to be completely defunct. DXLink is the new protocol, and most users had already migrated to it. Not too big of a deal up to this point.

However, it appears that Tastytrade is now providing two different websockets for use with DXLink. The first, obtained by hitting the /quote-streamer-tokens endpoint, has been around for a long time. It is the endpoint used by official Tastytrade applications (I confirmed it’s still being used by the Tasty web platform with a MITM just now), and doesn’t have many restrictions with respect to event types, instrument types, etc. The second, newer one, /api-quote-tokens, is designed specifically for us API users.

Apparently, the /quote-streamer-tokens endpoint is now reserved for internal usage, and it is considered a violation of DXFeed TOS to use it. According to Devin Moss from TT:

“Distributing quote data is something that puts tastytrade at some risk of breeching [sic] licensing agreements, especially if they were to make it available to all users with API access. tastytrade has no control over what API users do with those quotes, which poses a real possibility that abusers could use the data to source their own proprietary projects.”

Well, there’s definitely plenty of people using the data “to source their own proprietary projects,” though I thought that was kind of the whole purpose of the API… It certainly appears most users are using it alongside Tastytrade in a way that seems to fit within the API’s intended purpose.

So where does that leave us? Well, to start off, some “normal” users will be unaffected. Those who are not trading indices nor futures and don’t use greeks will hopefully be able to use the new websocket without problems. It’s already mostly implemented in #140.

However, there are many users who are relying on the streamer for other kinds of instruments (especially SPX afaict) or events, like greeks. These users could continue to use the old DXLink websocket; however, Devin has also said:

“For the time being, please only use the [/api-quote-tokens] endpoint. API users who rely on the /quote-streamer-tokens endpoint will be flagged and put on delayed quotes.”

So this is pretty bad news for a lot of users. I guess it was too good to be true that simply creating a Tastytrade account was enough to get real-time data for any instrument you could want? Anyways, that’s pretty much where we’re at for now. It doesn’t seem like Tastytrade will change this, but maybe if we get enough people to email them something can be worked out.

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Reactions: 1
  • Comments: 48 (28 by maintainers)

Most upvoted comments

Hey @Graeme22 , Ran into a warning regarding this, DeprecationWarning: ssl.SSLContext() without protocol argument is deprecated. async with DXLinkStreamer(s, ssl.SSLContext(cafile=certifi.where())) as streamer: I suppose we just ignore it? Thanks

Yup! If you ever get an actual error instead of a warning, you can follow the instructions here: https://stackoverflow.com/a/72810634/13938613

Firstly, thanks for all your effort. I ran into this issue as well on mac, but I was able to fix it this way. I just have a question. If I want to deploy my app with this DXLinkStreamer on cloud such as gcp or AWS, do I still need this bit or not?

Hi, glad to help!

I think probably not, I’ve been deploying to Heroku without any issues so I suspect it’s a Mac-only thing.

Just the presence of the context fixed all issues.

BTW I believe my suggestion and the one you mentioned are essentially the same. Certifi packages the certificates in the site-packages folder and provides the path to the certificates using the where() command. I have also used this method elsewhere in my app, specifically when using a Discord API in my product, where I use Certifi due to i ran into the same error message. Based on the development history, I previously downloaded the certificates from Mozilla for Tasty API and stored them in my app as files. These are, to my knowledge, the same certificates that Certifi includes. Both methods should work and, as far as I understand, have the same effect.

Thanks for all your hard work and the update. I view the loss of the ability to get greeks as an absolute disaster!