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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
244 4 9 15

Economic timeseries in the Eikon Data API

I can get historical CPI levels in Excel via RtHistory using calls such as =RHistory("aAUCCPIE/CA","ECONOMIC.Timestamp;ECONOMIC.Value","START:22-Feb-2009 END:22-Feb-2019 INTERVAL:1MO",,"TSREPEAT:NO")

How do I do the equivalent call in the Eikon Data API? I've tried requesting via get_timeseries (e.g. df = eikon.get_timeseries('aAUCCPIE/CA', interval='monthly', fields='*')), and that fails with Error code -1. I've also tried using get_data (e.g. df = eikon.get_data('aAUCCPIE/CA', ["ECONOMIC.Timestamp", "ECONOMIC.Value"], {'SDate':'2-22-2009', 'EDate':'2-22-2019'}), but that fails as well.

Is there any other way to get historical CPI (or other economic data) of various countries via the Eikon Data API, or does this require Excel?

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpythoneconomic-data
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
39.2k 75 11 27

Thanks @davidk
It looks like it can be related. The strange thing is that I'm not reproducing this while you've experienced it more than once (probably even consistently) at roughly the same time I tried. Since the backend is the same for you and me I would expect to see the same behavior you do. Does the issue persist? Are you still able to reproduce it? If yes, it would be great to generate the log file:

eikon.set_log_path(r'C:\Temp')
eikon.set_log_level(10)
The log file name will be pyeikon.%Y%m%d.%H-%M-%S.log
If this is the same backend problem @igorg experienced yesterday, you should see the same error in the log file as posted on the thread you referenced.
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.

@Alex Putkov. it will not work because the log function is still broken in v46 Eikon python module

@igorg
The issue with the logger not producing the log file is fixed in Eikon Python library v1.0.0 available from PIP. If you use the latest version of Eikon Python library you can indeed create the log file following the procedure I described.

@Alex Putkov. you're right. I'm still on 0.1.13. What other issues were fixed in this release? I remember at least 2 more :

1. problem with normalize parameter

2. get_timeseries - works only for 1 instrument for 'tick' data

Show more comments

Ugh. As of this morning I can no longer reproduce, though it was consistent all day Friday.. Running literally the same notebook now works just fine. Admittedly, though, while I restarted my Python kernels several times on Friday, I didn't restart Eikon itself or log out and log back in, which I did do after the weekend. Not sure if that's related.

Upvotes
39.2k 75 11 27

I have no problem executing eikon.get_timeseries('aAUCCPIE/CA', interval='monthly') on my end. Could you try again and capture the full error message returned?

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
244 4 9 15

Stacktrace below. Possible relation to https://community.developers.refinitiv.com/questions/38917/eikon-data-api-timeseries-request-failed.html which also had the message "Time Series Error" and was apparently a headend problem?

---------------------------------------------------------------------------
EikonError                                Traceback (most recent call last)
<ipython-input-54-04dfbd56ee0f> in <module>()
----> 1eikon.get_timeseries('aAUCCPIE/CA', interval='monthly')

C:\Users\krychd\Projects\Python\shared\DataLoaders\general\eikon.pyc in get_timeseries(rics, fields, start_date, end_date, interval, count, calendar, corax, normalize, raw_output, debug)
    194             limiter.request_message()
    195             result = ek.get_timeseries(rics, fields, start_date, end_date, interval, count,
--> 196                                        calendar, corax, normalize, raw_output, debug)
    197             limiter.added_message()
    198         except ek.EikonError as e:

C:\Miniconda3\envs\prod\lib\site-packages\eikon\time_series.pyc in get_timeseries(rics, fields, start_date, end_date, interval, count, calendar, corax, normalize, raw_output, debug)
    191     if len(ts_status_errors)==len(ts_timeserie_data):
    192         logger.error(ts_error_messages)
--> 193raise EikonError(-1, message=ts_error_messages)
    194 
    195     if raw_output: return ts_result

EikonError: Error code -1 | aAUCCPIE/CA: TimeSeries request failed | 
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