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
9 1 1 3

download stock index price by a list of RICs

Hi! I am trying to download daily price of stock index from a list of RICs by the following code. But it does not work. Can you please help me on this?

df, e = ek.get_data(["MERV","SP500","ATX"], 
                    ['TR.PriceClose(Curn=USD)','TR.PriceClose.calcdate'],
                     {'SDate': '2012-01-01',
                     'EDate': '2023-02-10','Frq':'D'})
df
eikonpython#technologyapi#contentindex
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.

1 Answer

· Write an Answer
Upvotes
Accepted
79.3k 253 52 74

@jiayin.meng.20

Thank you for reaching out to us.

Typically, the index RICs are prefixed with the "." character.

The code looks like this:

df, e = ek.get_data([".MERV",".SP500",".ATX"], 
                    ['TR.PriceClose(Curn=USD)','TR.PriceClose.calcdate'],
                     {'SDate': '2012-01-01',
                     'EDate': '2023-02-10','Frq':'D'})
df

1713431666155.png



1713431666155.png (30.7 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.

Aha! Thank you so much @Jirapongse

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.