Upgrade from Eikon -> Workspace. Learn about programming differences.

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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 1 3

Problem with eikon API

We are experiencing the issue on Eikon API after restarting PC.


Version: Desktop 4.0.56


>>> import eikon as ek
>>> print(ek.__version__)
1.1.14


http://localhost:9000/api/status
Cannot GET /api/status

http://localhost:9000/api/data/v1
Cannot GET /api/data/v1

http://localhost:9000/ping?all
{"port":9000,"mode":"eikon4","pid":11644,"hasSecure":true,"startedTime":"Fri Feb 11 2022 12:13:42 GMT+0100 (Paris, Madrid)","subApps":[{"path":"/heap"},{"path":"/ping"},{"path":"/sxs","data":{"hasSecure":true,"sxsApps":{}}},{"path":"/sxs/v1/services/messenger"}]}

http://127.0.0.1:9000/api/handshake.
Cannot GET /api/handshake.


>>> import eikon as ek
>>> ek.set_log_level(1)
>>> ek.set_app_key('apikey')
2022-02-11 13:08:56,465 P[13028] [MainThread 7332] Reset a Desktop session with new app_key
2022-02-11 13:08:56,465 P[13028] [MainThread 7332] Unlock login_event for streaming session 0 due to stop streaming call
2022-02-11 13:08:56,480 P[13028] [MainThread 7332] Send GET request to http://127.0.0.1:9000/api/status to detect API Proxy...
2022-02-11 13:08:56,480 P[13028] [MainThread 7332] Request to http://127.0.0.1:9000/api/status
headers = {'x-tr-applicationid': 'apikey'}
params = None
2022-02-11 13:08:56,496 P[13028] [MainThread 7332] HTTP request response 404: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/status</pre>
</body>
</html>

2022-02-11 13:08:56,496 P[13028] [MainThread 7332] Checking proxy url http://127.0.0.1:9000/api/status response : 404 - <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/status</pre>
</body>
</html>

2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Port 9000 was retrieved from .portInUse file
2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Try to handshake on url http://127.0.0.1:9000/api/handshake...
2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Request to http://127.0.0.1:9000/api/handshake
headers = {'Content-Type': 'application/json', 'x-tr-applicationid': 'apikey'}
params = None
2022-02-11 13:08:56,512 P[13028] [MainThread 7332] HTTP request response 404: <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/handshake</pre>
</body>
</html>

2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Response : 404 - <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/handshake</pre>
</body>
</html>

2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Response 404 on handshake url http://127.0.0.1:9000/api/handshake : <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/handshake</pre>
</body>
</html>

2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Application ID: apikey
2022-02-11 13:08:56,512 P[13028] [MainThread 7332] Init a Desktop session with new app_key
>>>


Can somebody help to identify and resolve API connection issues ?

Thank you.

eikoneikon-data-apipythonapi
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.

Hello @Magouloub ,

Thank you for your participation in the forum.

Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the appropriate reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

-AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,
AHS

Upvotes
Accepted
1.3k 3 2 4

Hi @Magouloub ,

According to "Cannot GET /api/status " response on request to http://127.0.0.1:9000/api/status, it seems that API Proxy isn't running in your Eikon.

This could be due to your Eikon Variant model.
You can follow this thread for information on availability of Eikon Data APIs in various Eikon variants.

The second possibility (if it worked before) is coming from a failure of API Proxy. Do you reproduce the issue if you restart Eikon ?

Could you check http://127.0.0.1:9000/api/status result in a browser ?
It should be something like :

{"statusCode":"ST_PROXY_READY","version":"3.1.0"}


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.

Upvotes
1 0 1 3

Hi,

I have the same error after restarting PC and Eikon:


http://localhost:9000/api/status

Cannot GET /api/status


I tried to change 9000 to 9060 and restart eikon but nothing changed

C:\Users\LOGIN\AppData\Roaming\Thomson Reuters\Eikon API Proxy\.portInUse

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.

Upvotes
1.3k 3 2 4

Did it work recently ?
This seems to be due to your Eikon Variant model.
According to this thread, the Python feature should be available in Eikon Premium only. Please contact your account manager to discuss options that meet your needs.

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.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.