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
16 4 2 5

How could I get the isin code of S&P500 constituents on a specific date?

I can get RIC by using: eikon.get_data('.SPX', ['TR.IndexConstituentRIC' , 'TR.IndexConstituentName'], {'SDate':'20180501'})[0]

How could I get the isin code directly? apparently, 'TR.IndexConstituentISIN' does not work.

Thanks!

eikoneikon-data-apipythonrefinitiv-dataplatform-eikonworkspaceworkspace-data-apiisin
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.

Hello @pengxin1211

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query? If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Hello @pengxin1211

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

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

Thanks,

AHS

@pengxin1211, 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
18.2k 21 13 21

Hi @pengxin1211

You can make another calls to get ISIN code.

df=ek.get_data('.SPX', ['TR.IndexConstituentRIC' , 'TR.IndexConstituentName'], {'SDate':'20180501'})[0]
riclist = df['Constituent RIC'].tolist()
df2=ek.get_data(riclist, 'TR.ISIN')
print(df2)

isin.png (28.8 KiB)
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.

Upvotes
13.7k 26 8 12

Hi @pengxin1211,

There is an equivalent alternative to Chavalit's code, using get_symbology instead of get_data for the second call:

df=ek.get_data('.SPX', 'TR.IndexConstituentRIC', {'SDate':'20180501'})[0]
riclist = df['Constituent RIC'].tolist()
df2 = ek.get_symbology(riclist, from_symbol_type='RIC', to_symbol_type='ISIN')
df2

Note: parameter from_symbol_type is optional (it defaults to RIC).

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.