tastyworks_api icon indicating copy to clipboard operation
tastyworks_api copied to clipboard

Adding a Greeks class

Open perigvennetier opened this issue 3 years ago • 2 comments

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

perigvennetier avatar May 02 '21 04:05 perigvennetier

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.

def-mycroft avatar May 12 '21 14:05 def-mycroft

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.

perigvennetier avatar May 20 '21 03:05 perigvennetier