Where can I get a list of the fields returned from OptionChainProvider.GetOptionContractList.?
I can see in examples Id.OptionRight, Id.Date, Id.Strikeprice, but are there other fields?
Can I get the Bid/Ask Prices and Deltas?
Where can I get a list of the fields returned from OptionChainProvider.GetOptionContractList.?
I can see in examples Id.OptionRight, Id.Date, Id.Strikeprice, but are there other fields?
Can I get the Bid/Ask Prices and Deltas?
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Hi John,
Unfortunately any price related properties are not available via the OptionChainProvider.
https://www.quantconnect.com/docs/data-library/options#Options-Requesting-Options-Data---OptionChainProviderMy suggestion any time you are wanting to know the attributes of a QC object is use the debugger to stop just after the object. Then use the dir() function in the Debug Watch to see what attributes are available.
e.g:
options = self.OptionChainProvider.GetOptionContractList("AAPL", self.Time)
Stop on the line after this. To see the attributes for each option, view "dir(options[0])". To see the attritubes for the first option's ID, view "dir(options[0].ID)".
For price related properties, you have to subscribe to an option's price data first.
Best of luck!
And fyi here's a way to get price info just after adding an option contract:
https://www.quantconnect.com/forum/discussion/10685/option-premium-price-using-the-optionchainprovider-getoptioncontractlist-method/p1
Hi John,
The Symbol.ID is a SecurityIdentifier object. Furthermore, Bid/Ask information is not available from this method, so you would need to first add the contract first.
Best,
Shile Wen
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can
continue your Boot Camp training progress from the terminal. We
hope to see you in the community soon!