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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 2 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-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
6.7k 8 6 7

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

Upvotes
1 0 2 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 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea