tastyware / tastytrade

An unofficial, sync/async Python SDK for Tastytrade!
https://tastyworks-api.rtfd.io
MIT License
127 stars 43 forks source link

Instruments: Add nested format for futures option chains #38

Closed Graeme22 closed 1 year ago

Graeme22 commented 1 year ago

Currently, the SDK supports equity option chains in two formats: nested (which contains extra meta-information, but requires the user to do more work afterwards) and default, which is just a mapping of expiration to a list of Option objects.

Futures option chains also has the default implementation via tastytrade.instruments.get_future_option_chain(), but lacks a nested equivalent.

This will be a good feature to work on after the main release as it's not essential, given we already have one way to access futures option chains. The endpoint we'll use is: /futures-option-chains/{symbol}/nested.

Graeme22 commented 1 year ago

Done with #46