Eikon API HTTP errors in previously working scripts

I can't get my Eikon API scripts to work anymore. I created a new App Key to check if this is the problem but this didn't help. Example of command and error message:

> get_timeseries("MSFT.O","*","2016-01-01T15:04:05","2016-01-10T15:04:05","daily")

Error in print.default("HTTP Error, code= ", response$status_code, sep = "") : invalid 'digits' argument

I use the eikonapir package for interfacing with R.

Was there something done at the server side? (I received a message from Reuters that Eikon Data API is getting out of beta into production)

Thanks,

claudiu

Best Answer

  • @claudiu
    Thank you for providing the details that helped me reproduce and analyze the issue.
    The root cause of the problem is a deficiency in eikonapir package, specifically in the implementation of get_symbology method. If you look at the source code on GitHub you'll see that the function starts with calling set_app_id method and setting the app key to a hardcoded value. This was of no significance while TR did not validate the app IDs. Since last weekend TR started validating app keys and that's when the deficiency in eikonapir package became apparent and critical. Every time you call get_symbology method the method sets the app key to an invalid value and any data retrieval method you execute subsequently fails unless you call set_app_id method in your script and reset the app key to a valid value. But the next time you call get_symbology method, not only will the method fail, but it will also reset the app key to an invalid value and all subsequent data retrieval calls will fail again.
    As an immediate workaround I can suggest replacing get_symbology calls with get_data for symbology conversion, e.g. get_data("MSFT.O","TR.ISIN").
    Eikonapir is an open source project. Everyone is welcome to contribute a bug fix.

Answers

  • Same here, need to investigate

  • eikonapir is not officially supported by Thomson Reuters, you can reach the creator directly at https://github.com/ahmedmohamedali/eikonapir

  • this may be so but the package has not been changed since February and the scripts stopped working last week so the problem was caused by Thomson Reuters

  • Thanks Alex. To summarize, the problem I saw was composed of 2 issues:

    1. The problem described above with the get_symbology command in eikonapir.

    2. An old app_id in the script. The eikonapir query commands used do not give a very informative error message and this combined with the problem described above caused my scripts to fail even after generating a new app id.

    Update 27/6/2018: Issue 1 fixed in eikonapir package so problem solved. Since the error description (issue 2) has not been changed it will still throw the above described error for invalid app ids.

  • I've made a pull request on Github to remove 'set_app_id' from 'get_symbology'.

  • great. checking for the app id error for all commands (get_timeseries, get_data...) and showing an error with the correct message would be an useful enhancement also.

  • The fix has been merged. The other commands should work fine too. Could you please reinstall the package and confirm if it works for you now please? I agree error messages would be very helpful. Hopefully we can someday ship an official R package besides the Python one..

  • I'm still getting the error message after reinstalling the package.

  • Ok that is weird. If I look at the source code of the package, in "symbology.R" the hardcoded set_app_id() has been removed.... Could you check if that is the same in your installed package?

  • I checked that first thing. I've re-installed the package a couple of times but it didn't fix the problem.

    When I run the below, I see that the function doesn't have set_app_id() in it anymore.

    > eikonapir::get_symbology

  • Example of error with debug:
    get_data(list("IBM", "GOOG.O", "MSFT.O"), list("TR.PriceClose", "TR.Volume", "TR.PriceLow"), debug=TRUE)
    [1] "Request *****" {"Entity":{"E":["DataGrid"],"W":{"instruments":[["IBM"],["GOOG.O"],["MSFT.O"]],"fields":[{"name":["TR.PriceClose"]},{"name":["TR.Volume"]},{"name":["TR.PriceLow"]}]}}}
    [1] "Response *****"
    [1] "{\"ErrorCode\":1401,\"ErrorMessage\":\"Application id <ID> is invalid\"}"
    [1] "Response status ********"
    [1] 403 Error in print.default("HTTP Error, code= ", response$status_code, sep = "") : invalid 'digits' argument

  • The error message is indicative of an unknown app id. Suggest you create a new app id following the updated method described by Alex and use that key.

  • Tried that 10 minutes ago (discovered an updated app id app) and it didn't work. Tried again after your comment - and it works! Thanks Claudiu and Joris!

  • I've generated new APP ID and get the following message. Was working earlier and have never had this particular issue....

    mc <- eikonapir::get_data("MSFT.O",'TR.CompanyMarketCap, SDate = 2019-10-01')

    Error in print.default("HTTP Error, code= ", response$status_code, sep = "") :

    invalid 'digits' argument