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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
12 3 1 2

Check if Eikon Data API is connected to the proxy

What is the best way to test in Python whether the Eikon Proxy is running?

When I run the set_app_key function I sometimes get an error saying ""Error on checking port 9000". This error is caused as Eikon has no running connection as I might be logged in on my mobile phone although Eikon is still running on my Desktop.

Thanks for your help.

eikoneikon-data-apiworkspaceworkspace-data-apirefinitiv-dataplatform-eikonpython
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.

1 Answer

Upvotes
Accepted
39.2k 75 11 27

If you use the latest version of Eikon Data APIs library for Python (v1.0.1) and you execute get_data or get_timeseries methods when Eikon API Proxy is not available, the methods will throw an exception "EikonError: Error code 401 | Eikon Proxy not installed or not running. Please read the documentation to know how to install and run the proxy." This exception can be easily trapped using try... except.

try:
    ek.get_timeseries('TRI.N')
except ek.EikonError as err:
    if err.code == 401:
        print("Eikon API Proxy is not available")
For this reason I'm not sure what value a separate from a data retrieval call test if Eikon API Proxy is available would provide. But if for whatever reason you need such a test, then calling set_app_key is your best bet.
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