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

Get timeseries for SPX in python

Problem: I get this error: "eikon.eikonError.EikonError: Error code 500 | Backend error. 500 Internal Server Error"

When i limit to only 200 stock I get only like 20 days... Loops dont work either

My code:

import eikon as ek

ek.set_app_id('APP ID')



dfSPX, e = ek.get_data(["0#.SPX"],["X_RIX_NAME"])
Tickere = dfSPX["Instrument"].tolist()

df = ek.get_timeseries(Tickere, fields=["Close"],start_date="2018-01-01",end_date="2019-12-27")
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.

@bendik.ronning
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 next to the reply that best answers your question. 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

Upvotes
Accepted
3.8k 4 4 6

Hi @bendik.ronning

You can try another way:

ek.get_data('0#.SPX','TR.PRICECLOSE', {'SDate':'2018-01-01', 'EDate':'2019-12-27'})
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.

How do I also get the timestamp?

Hi @bendik.ronning

You need to add an extra field with suffix ".date". Example below.

ek.get_data('0#.SPX',['TR.PRICECLOSE.date','TR.PRICECLOSE'], {'SDate':'2018-01-01', 'EDate':'2019-12-27'})
Upvotes
18.2k 21 13 21

Hi @bendik.ronning

Please review this document.

You can split the big request into a smaller request and slow down the number of request per second.

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.