For a deeper look into our Eikon Data API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 1 2 2

Options from a chain ric for a specific month

Hello,

I want to retrieve options for a specific expiry month using the Eikon Data API, for the Swedish index ".OMXS30".

Using:

omxs30 = ek.get_data('0#OMXS30*.ST', fields=fields)[0]

where "fields" is a list, gives all options of course, but I'd like to narrow it down to a single month and year.

Looking at the chain constituents, they have a structure like "S30173000T0.ST". Trying to get all "S30" options with month "T0" using:

omxs30 = ek.get_data('S30*T0.ST', fields=fields)[0]

draws a blank.


Also, is there a way to retrieve options that are within say +/- 10% of the current underlying price, just as in the app OPTION WATCH? It would be great to be able to combine this with the specific moth selection mentioned above.


Thank you for your help.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonchain-ric
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvote
Accepted
18k 21 12 20

Hi @aNadjalin

S30*T0.ST is not a valid RIC.


You can implement filter easily in your Python code

(Please change the field according to your needs, I am using CF_LAST for demonstration purpose)


ahs1.png (20.0 KiB)
ahs.png (32.8 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
5 1 2 2

Thank you for a very clear and fast answer!

If I had included the err response from the API I would have seen that the RIC was wrong. Lesson learned.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea