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

Time series of data

When I run below it truncates data returned to last 6/7 months only despite my request going back a couple of years. Why does it do this? df = ek.get_timeseries(['EURCBS3M=ICAP', 'EURCBS6M=ICAP','EURCBS9M=ICAP','EURCBS1Y=ICAP','EURCBS18M=ICAP','EURCBS2Y=ICAP'], start_date="2016-08-01", end_date="2020-09-11")
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.

Upvotes
Accepted
10.2k 18 6 9

@paul67 The reason it is doing this is because of API limits. You can find out more information about API limits here. In the case of get_timeseries the limit is 3000 rows for interday. Hence why your return is being truncated. You can call the service iteratively per RIC or chunk of RICs that conform to the limits. The other thing with your query is that you didn't specify a field so you could get Open, High, Low, Close, Volume by default - if you only want Close - just specify that field.

Try this:

start='2016-08-01'
end='2020-09-11'
ts = pd.DataFrame()
df = pd.DataFrame()
instruments = ['EURCBS3M=ICAP', 'EURCBS6M=ICAP','EURCBS9M=ICAP','EURCBS1Y=ICAP','EURCBS18M=ICAP','EURCBS2Y=ICAP']
for r in instruments:
    try:
        ts = ek.get_timeseries(r,'CLOSE',start_date=start,end_date=end,interval='daily')
        ts.rename(columns = {'CLOSE': r}, inplace = True)
        if len(ts):
            df = pd.concat([df, ts], axis=1)
        else:
            df = ts
    except:
        pass
    
df

I hope this can help.


1600074286414.png (158.9 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
1 3 3 1
@jason.ramchandani Thank you very much. Several pieces of information that were useful to me
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.