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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 1 2 4

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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonisin
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
18k 21 12 20

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

Click below to post an Idea Post Idea