For a deeper look into our Eikon Data API, look into:
Overview | Quickstart | Documentation | Downloads | Tutorials | Articles
import eikon as ek import warnings warnings.filterwarnings("ignore") ek.set_app_key('xxxxxxxxxxxxxxxxxxxxxxxxxxxxx') time_series_interval = 'minute'
df = ek.get_timeseries('LCOc1', start_date='20200101', end_date='20200201', interval=time_series_interval)
The above code produces error:
2021-02-11 16:41:28,356 P[31484] [MainThread 63476] Error with LCOc1: No data available for the requested date range
2021-02-11 16:41:28,356 P[31484] [MainThread 63476] LCOc1: No data available for the requested date range |
Traceback (most recent call last):
File "C:\Users\....\.conda\envs\reutersdataenv\lib\site-packages\IPython\core\interactiveshell.py", line 3418, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-16-cc510d2060b5>", line 1, in <module>
df = ek.get_timeseries('LCOc1', start_date='20200101', end_date='20200201', interval=time_series_interval)
File "C:\Users\....\.conda\envs\reutersdataenv\lib\site-packages\eikon\time_series.py", line 198, in get_timeseries
raise EikonError(-1, message=ts_error_messages)
eikon.eikonError.EikonError: Error code -1 | LCOc1: No data available for the requested date range |
After a little investigation it looks like if the start date and end date are more than a year ago this error is produced. If instead i run:
df = ek.get_timeseries('LCOc1', start_date='20200201', end_date='20200301', interval=time_series_interval)
this seems to work fine!.
Any suggestions how to pull multiple years of data at minute intervals, not just 1 year?
Thanks
Hello @RAJEEV.PATEL,
Please see this previous discussion thread for more details, it is not possible to request more then 1 year of minute data with Eikon Data API python, which is desktop API.
If you require more content, extensive history coverage can be delivered by enterprise history products, for developers info, see Refinitiv Tick History (RTH) - REST API. HTTP REST interface can be accessed via Python. Please contact your Refinitiv account team for more information and to discuss your specific requirements.