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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 2

Eikon 404 error:

Hi, I'm trying to get data from the Eikon api. I've set my Eikon App key as follows:

ek.set_app_key('xxxxxxxx')

and then I try to retrieve data with:
df,e = ek.get_data('REUTERS','TR.RIC')

I get the following error

Client Error: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/v1/data</pre>
</body>
</html>

My Eikon is 1.1.10 so it's the newest. The Eikon desktop application is version 4.0.54, which is the newest version. I'm not trying to post data where this is a GET method call from Postman (and also browser). I simply don't know why this is not giving me data.

eikonworkspaceworkspace-data-apirefinitiv-dataplatform-eikoneikon-data-api-r
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

@olafur

I checked the entitlements on your Eikon account. You subscribe to the low tier Eikon variant named Eikon Core, which does not include access to Eikon Data APIs. If you would like the capability to retrieve Refinitiv data programmatically, please consider a higher tier Refinitiv product that does include this capability. If I understood you correctly, you also mentioned that your objective is to consume Refinitiv data in a Web service. If this is the case, please be informed that any Eikon variant is a single user service. The data usage license granted with this service permits the use of any data retrieved from Eikon for individual user's use only. If you'd like to utilize Refinitiv data in any kind of enterprise or multiuser application, please consider an enterprise product that permits the data usage in the manner in which you intend to utilize it. Your Refinitiv account manager or Refinitiv Sales Team will be happy to help you select the product that best fits your use case.

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
13k 32 12 18

Hello @olafur,

As mentioned in the previous question, have you tried the Eikon troubleshooting guide.

You cannot invoke the API requests from browser or postman. Please use Eikon libraries only (of which you have the latest version).

If you are still having issues following the quickstart and troubleshooting article, please attach the log files for us to help troubleshoot. You can also use API level logging as shown in the previous question.

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
1 0 0 2

Hi, I think you're misunderstanding me. We are not calling the python via Postman, but through a web servcie which calls the python code. The python code is giving me the error which I mentioned. I did look at the eikon troubleshooting guide but I found nothing that helps me. I tried what was suggested there, like if I have the latest api version and eikon application version.

I think maybe there is something wrong with my api key. Because when entered a invalid key, I'm getting the same error message.

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
13k 32 12 18

@olafur,

Is it possible for you to test the python code directly without the web service. Just open up a python terminal, and issue the following commands -

>>> import eikon as ek
>>> ek.set_app_key('VALID_APP_KEY')
>>> df, err = ek.get_data('GOOG.O', ['TR.Revenue', 'TR.GrossProfit'])
>>> print(df)
  Instrument       Revenue  Gross Profit
0     GOOG.O  182527000000   97795000000

Here is the response if invalid app key is used.

>>> import eikon as ek
>>> ek.set_app_key('INVALID_APP_KEY')
>>> df, err = ek.get_data('GOOG.O', ['TR.Revenue', 'TR.GrossProfit'])
2021-06-02 12:17:57,956 P[4796] [MainThread 6904] Error code 403 | Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id INVALID_APP_KEY is invalid"}
2021-06-02 12:17:57,957 P[4796] [MainThread 6904] HTTP request failed: EikonError-Client Error: {"ErrorCode":1401,"ErrorMessage":"Application id INVALID_APP_KEY is invalid"}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\gsbal\Envs\eikon\lib\site-packages\eikon\data_grid.py", line 192, in get_data
    if result.get('responses'):
AttributeError: 'NoneType' object has no attribute 'get'


You haven't attached the application logs as requested!

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
13k 32 12 18

Note that Eikon desktop also has to be running on the same machine as mentioned in the troubleshooting guide.

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
1 0 0 2

I went through the troubleshooting guide again. It appears that the APIPROXY is not running. I tried restarting the computer, but it didn't work. When I try http://localhost:9060/api/status I get error connection in return instead of json response like stated in the troubleshooting guide. I was wondering how can I restart the APIPROXY?

I tried setting up eikon application on a different machine, but still I'm not able to get response from http://localhost:9060/api/status, Its like the service is also not running on the other machine. This is probably what is causing the eikon api returning me 404 error. But I've restarted both of the machines several times, but still I cant get the APIPROXY running.

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