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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
4 1 1 2

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-apipythonworkspaceworkspace-data-apirefinitiv-dataplatform-eikonindex
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

Upvotes
Accepted
44 4 8 14

@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.