tastyware / tastytrade

An unofficial Python SDK for Tastytrade!
MIT License
98 stars 33 forks source link

remove dxfeed REST; dxfeed to occ helper; add earnings #120

Closed Graeme22 closed 5 months ago

Graeme22 commented 5 months ago

Description

Adds a new EarningsReport object that contains information about the next earnings date, EPS estimates and miss. This is contained in the MarketMetricInfo class but was not documented so had to be dug up with MITM. Removes the old dxfeed REST API calls from the ProductionSession class as they don't seem to be working anymore :( though they were never officially documented to begin with. Adds a helper function Option.streamer_symbol_to_occ to get an equivalent OCC symbol from the dxfeed format. This is helpful when you need to go from fetched greeks to a specific option, for example. The reverse (OCC to dxfeed) is unnecessary because you can just call Option.get_option(session, symbol).streamer_symbol.

Related issue(s)

Fixes #116

Pre-merge checklist

Please note that, in order to pass the tests, you'll need to set up your Tastytrade credentials as repository secrets on your local fork. Read more at CONTRIBUTING.md.