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

question

Upvotes
Accepted
4 2 3 6

S&P 500 constituents list

Hi,


I'm trying to download the S&P 500 constituents list for the year 2002 using the following code:

sp2002, err = ek.get_data('.SPX(20020101)',

'TR.IndexConstituentRIC'

)


the code was working before but is not working now; I get the "JSONDecodeError: Expecting value" error.

I was wondering why this happens now, could anyone help me with this?


Thanks in advance,

Mahdieh

eikoneikon-data-apipythonworkspacerefinitiv-dataplatform-eikonworkspace-data-apiindex
icon clock
10 |1500

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

1 Answer

· Write an Answer
Upvotes
Accepted
63 10 17 19

@mahdiehvg ek.get_data('.SPX',['TR.IndexConstituentRIC(SDate=2002-01-01)']) should work. However, i dont know if the constituent data is being retained for a period so long ago.

icon clock
10 |1500

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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