boyan-soubachov / tastyworks_api

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

Updated 'example.py' + updated some classes to allow for more data + comments #74

Closed perigvennetier closed 3 years ago

perigvennetier commented 3 years ago

Problem addressed

The example.py file was not very easy to understand for new people and was not showing a lot of the functionalities. Some of the information for options were missing.

It may help solve these issues: https://github.com/boyan-soubachov/tastyworks_api/issues/70 https://github.com/boyan-soubachov/tastyworks_api/issues/60 https://github.com/boyan-soubachov/tastyworks_api/issues/53 https://github.com/boyan-soubachov/tastyworks_api/issues/48

Solution

I added some more examples and put some comments as well in example.py. Added a 'greeks' class to hold the option greeks values Added more information in the orders class as some were missing Changed 'expiry' to 'expiration_date' for clarity (this one could be reversed but I feel it's clearer this way (expiry could refer to a Weekly or Monthly expiration type). I had to update the tests as well for this one.

Checklist

perigvennetier commented 3 years ago

Closing this as I will have a better one soon.

perigvennetier commented 3 years ago

I closed this PR because what I submitted was very messy. I am taking in all the comments and will provide the update I had made piecemeal in other clearer smaller PRs so it's easier to digest. I submitted the Greeks one already and will continue to work on this. This is getting close to being usable in a actual algo I have in mind :D