Hi,
how can I get a futures list and their expiry date into the python API.
Basically I want to import all futures linked to e.g. 0#W: with their expiry. I would also like to import the option chain linked to a future.
Upgrade from Eikon -> Workspace. Learn about programming differences.
For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
Hi,
how can I get a futures list and their expiry date into the python API.
Basically I want to import all futures linked to e.g. 0#W: with their expiry. I would also like to import the option chain linked to a future.
@joris
Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.
Thanks,
-AHS
@joris
Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.
Thanks,
-AHS
hi @joris,
you can get the futures/expiration dates with one request:
req, err = tr.get_data(['0#W:'], ['EXPIR_DATE'])
result:
I could not find a good way to extract the option chains though, you might have to parse it from the contract specification pages (CBT/W) or, in this case, by adding a + to the contact root: 0#W+.
You can also read this to get all underlying instruments for an options chain.