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
18 3 1 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-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-api
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.

@ethan.lin, thank you for your participation in the forum. Are any of the replies below satisfactory in resolving your query? If yes please click the 'Accept' text beneath the most appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question. Thanks, AHS

@ethan.hayashi

Hi,

Thank you for your participation in the forum.

Is the reply below satisfactory in answering your question?

If yes please click the 'Accept' text next to the most appropriate reply. This will guide all community members who have a similar question.

Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,

AHS

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 512.0 KiB each and 1.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 512.0 KiB each and 1.0 MiB total.

Thank you~ It is worked too.

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.