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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles


244 11 11 16

AF.N^I17 giving Invalid RIC for get_timeseries, works on get_data

Odd behavior for one particular historical RIC in the Eikon Data API. If I use get_data, I can get the correct last data for this, valid as of 2017-09-29:

In [55]: eikon.get_data('AF^I17', ['TR.Close', 'TR.Volume'])
(  Instrument  Price Close    Volume
 0     AF^I17         21.5  16922941, [])

However if I use get_timeseries to get the full history, I receive an exception saying Invalid RIC when requesting the same security:

In [56]: eikon.get_timeseries(['AF^I17'], start_date='2000-01-01', end_date='2017-10-02')
2019-08-16 18:26:24 pyeikon WARNING> Error with AF^I17: Invalid RIC
2019-08-16 18:26:24 pyeikon ERROR> AF^I17: Invalid RIC |
EikonError                                Traceback (most recent call last)
<ipython-input-56-bc986d533278> in <module>()
----> 1 eikon.get_timeseries(['AF^I17'], start_date='2000-01-01', end_date='2017-10-02')

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)
    195     if len(ts_status_errors)==len(ts_timeserie_data):
    196         logger.error(ts_error_messages)
--> 197         raise EikonError(-1, message=ts_error_messages)
    199     if raw_output: return ts_result

EikonError: Error code -1 | AF^I17: Invalid RIC |

This doesn't make any sense. I have tried many other historical RICs and by and large they work just fine with get_timeseries. This issue appears to be limited to AF^I17 and AF.N^I17.

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.

1 Answer

18.1k 21 13 21

Hi @davidk

The RIC for "AF^I17" is "AF^J17", please see picture below:

Another problem in your API call is that there is a limitation on number of records return.

Please refer to this document.

So, querying data for 17 years would not work.

ahs.png (71.5 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.

Interesting. Unusual for such a RIC AF^I17 to return data at all under get_data when the proper RIC is AF^J17, but makes sense.