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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
5 0 0 2

get_timeseries doesn't start from the date I put - Eikon API python

I only get data from 4/2/2019 to today, but I was asking for data from 1/1/2007 to today.

this is my code:

iso =['AT','BE','BG','CH','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GE','GR','HR','HU','IE','IS','IT','LT','LU','LV','MT','NL','NO','PL','PT','RO','RS','RU','SE','SI','SK','TR','UA'] 
iso[:]=[x + "5YT=RR" for x in iso]
sovereign=ek.get_timeseries(iso , fields=['CLOSE'], start_date ='2007-01-01', interval='daily')   

Any suggestions?
Thanks

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythonapitime-seriesextraction
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.

1 Answer

Upvote
Accepted
3.8k 4 4 6

Hi @derivato

You can try with ek.get_data like the example below:

iso =['AT','BE','BG','CH','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GE','GR','HR','HU','IE','IS','IT','LT','LU','LV','MT','NL','NO','PL','PT','RO','RS','RU','SE','SI','SK','TR','UA'] 
iso[:]=[x + "5YT=RR" for x in iso]
sovereign = ek.get_data(iso,["TR.BIDYIELD.date","TR.BIDYIELD"], {"Sdate":'2007-01-01','EDate': 0,})[0] 
sovereign
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.

it gives me a different structure but there seem to be everything - thanks a lot

Just a quick clarification: what's the meaning of the final [0]?

Hi @derivato

ek.get_data returns a tuple of a pandas.DataFrame and an Error object.

You can also do it this way:

sovereign, err = ek.get_data(iso,["TR.BIDYIELD.date","TR.BIDYIELD"], {"Sdate":'2007-01-01','EDate': 0,})
sovereign
Click below to post an Idea Post Idea