tastyworks_api
tastyworks_api copied to clipboard
Adding a Greeks class
Problem addressed
Greeks class missing to hold all the greeks for a specific option symbol.
Solution
- Created a Greeks class
- Added a greeks field in the Option class.
- Added 'symbol_occ' and 'symbol_dxf' in the Options class to hold the two symbols variations by default at post_init. It seems that it'll be simpler to just have them in the object at initialization rather than having to call for their creation because you can't really do anything on the option itself unless you have these symbols so why force the user to have to create the (you need it for greeks, for subscription, for trade, etc.).
- Updated the example to include an example of the Greeks (this may be better done in the Options class with a get_greeks() method.
Checklist
- PR commits have been squashed
- All tests pass
- Code adheres to contributing guidelines
is this required to retrieve the greeks or is there currently a way to achieve this functionality? trying to decide if I need to wait for this pull request to be finished or if I can do something else.
is this required to retrieve the greeks or is there currently a way to achieve this functionality? trying to decide if I need to wait for this pull request to be finished or if I can do something else.
You can use the streamer to pull greeks data but there is currently no class to hold the Greeks results. You'll have to manage the data in your implementation.