boyan-soubachov / tastyworks_api

An unofficial, reverse-engineered Python API for tastyworks.
Apache License 2.0
209 stars 79 forks source link

Watchlists - Still Dough #55

Open bandwiches opened 3 years ago

bandwiches commented 3 years ago

Issue 1 Some of this public stuff now requires auth headers to retrieve, even the public watchlists.


Issue 2 BASE_URL seems to be api.tastyworks.com now and doesn't require a special import


Both Issue 2 & 3 are already covered via the session model:

Issue 3 I was rewriting this today and can't help but wonder if this ever worked before or if it was close but not quite finished?

Original Code

This line right here just seems to either (A) return a coroutine or (B) "coroutine was never awaited" no matter how I implement it. Was this code supposed to return "self" or "self.watchlists"? I honestly just can't tell, this may be a little over my head but I'm so close to finishing this!

bandwiches commented 3 years ago

I created a pull request for this to be updated. I took a similar approach to tastyworks.models.trading_account in terms of accepting a TastyAPISession to retrieve headers, etc. etc. PR #57