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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 1 0 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-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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
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 5.0 MiB each and 10.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
18k 21 12 20

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

Click below to post an Idea Post Idea