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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
18 2 0 5

Hello , How to get S&P500 all stock by eikon python API ? thank you.

Hello , How to get S&P500 all stock by phthon API ? thank you.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
3.8k 4 4 6

Hi @ethan.lin

You can retrieve index RIC constituents along with their names using the syntax

ek.get_data("0#.SPX","TR.COMMONNAME")
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.

Thank you~ It is worked.

Upvote
4.6k 26 7 22

@ethan.lin, another way is to query the fundamental database for index constituents (current or historical):

ek.get_data('.SPX', 'TR.IndexConstituentRIC')
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.

Thank you~ It is worked too.

Click below to post an Idea Post Idea