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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
4 0 0 1

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonindex
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.

1 Answer

Upvotes
Accepted
45 3 5 10

@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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea