Article

Eikon Data API and Refinitiv Data Library - Troubleshooting

Chavalit Jintamalit
Developer Advocate Developer Advocate
Raksina Samasiri
Developer Advocate Developer Advocate

Latest update on March 2023

Introduction

This article walks you through the steps to troubleshoot two of the Python libraries below which need the Eikon Desktop or Refinitiv Workspace Application to integrate an API proxy that acts as an interface between the Python library and the Refinitiv Data Platform. For this reason, one of the desktop applications (Eikon Desktop or Refinitiv Workspace) must be running when you use the Python library.

-  Eikon Data API (EDAPI)
-  Refinitiv Data Library (RD Library) - Desktop session

In this article, you will learn the steps to ensure that the Eikon Desktop or Refinitiv Workspace is running properly on your machine. It also guides you to check if the Eikon Data API or Refinitiv Data Library (Python) is installed properly and up to date. Also, explain how to check the log information of the desktop application to ensure that the service is running properly.

Prerequisites reading

Before reading this article, please read the quick start guide below.

-  Eikon Data API - Quick Start Guide
-  Refinitiv Data Library for Python - Quick Start Guide

This article provides additional information to help troubleshoot when you cannot use these Python libraries by checking the Desktop application's version, enabling its log, and checking if the API proxy is running. Then enable EDAPI or RD Library log and run its sample code.

Troubleshooting Issues

If you encounter a problem when trying to use Eikon Data APIs. For example, in the screenshot above, "the Error code -1 | Port number was not identified. Check if Eikon Desktop or Eikon API Proxy is running." You may use the following information to identify and resolve API connection issues.

There are 2 sections in this article, each section contains how to check the desktop applications and the Python libraries part, as below

  1. Check Desktop Applications (Eikon Desktop, Refinitiv Workspace)
    1. Check the version 
    2. Enable logging
    3. Verify that Eikon Desktop/Refinitiv Workspace and Data API Proxy service are running properly
  2. Check Python libraries (Eikon Data API, Refinitiv Data Library)
    1. Check the version 
    2. Enable logging
    3. Execute sample code

Let's get started!

1 ) Check Desktop Applications

1.1 ) Eikon Desktop

1.1.1 ) Check the version: Click on the Menu button > Select "Help" > Select "About Refinitiv Eikon"

As of the time this article is updated (March 2023), the Eikon Desktop version is 4.0.62

1.1.2) Enable logging: Launch Configuration Manager from the Windows menu > Refinitiv Configuration Manager

Then enable the log on the Workstation, following the screenshot below.
Set "Trace Level" to "4 - Debug" only when you would like to troubleshoot the issue.

The location of the generated log file can be checked here, click on "Open logs folder" to browse to the folder.

1.1.3) Verify that Eikon Desktop and Data API Proxy service are running properly:
Inside the "Logs" folder, browse into the sub-folder "TRD". Then to the most recently created folder with the "Eikon.<datetime>.p<process-ID>" folder, open the "SxS.<datetime>.p<process-id>.txt" file

Locate "APIPROXY" and "API Proxy is available on port XXXX" in the log file. By default, the port is 9060.
And the server is started on port 9000.

6. Open http://localhost:9000/ping?all on a web browser.

And make sure that you can locate {"path":"/api"}.

7. Open http://localhost:9060/api/status on a web browser.

And make sure that you can locate "ST_PROXY_READY".

This is a confirmation that the APIPROXY is running properly and ready for a connection from Eikon Data APIs.

If the Data API Proxy service is failed to start. A general guideline is to restart your machine and the Eikon Desktop application. If the problem persists, please contact Refinitiv Helpdesk at https://my.refinitiv.com/ and ask the helpdesk to escalate the ticket to the Technical Service Group including API Proxy and SxS log files and the API log.

1.2 ) Refinitiv Workspace

1.2.1 ) Check the version: Click on the ? button > Select "About Refinitiv Workspace"

As of the time this article is updated (March 2023), the Refinitiv Workspace version is 1.21.406

1.2.2) Enable logging: Launch Configuration Manager by clicking in the Help menu > Configuration Manager

Or launch Configuration Manager using the command below in Command Prompt

    	
            "C:\Users\Uxxxxxxx\AppData\Local\Refinitiv\Refinitiv Workspace\RefinitivWorkspace.exe" --config-manager --dev
        
        
    

Then enable the log in the Logs tab > Select Trace Level to Debug (only when you would like to troubleshoot the issue), following the screenshot below.
The location of the generated log file can be checked in the Logs Folder section, click on the location hyperlink to browse to the folder.

1.2.3) Verify that Refinitiv Workspace and Data API Proxy service are running properly:
There are two ways to check if the API proxy is running properly in the Refinitiv Workspace, by checking in the Refinitiv Workspace application and checking in the log folder

a) Checking in the Refinitiv Workspace application
In the window "About Refinitiv Workspace" (from the step 1.2.1), select "Data API Proxy" tab, here we can check the Data API Proxy Status, version, and URL. You can see that the Data API Proxy status here is Ready.

When accessing the URL of the Data API Proxy, we can see that the "Data API Proxy is up and running on Production environment" indicates that the Data API Proxy is running properly.

b) Checking in the log folder
Inside the "Refinitiv Workspace Logs" folder, browse into the sub-folder with the most recently created folder with the "Desktop.<date>.<time>.p<process-ID>" folder

Then, open the "node-sxs.<date>.p<process-id>.log" file

Locate "APIPROXY" and "API Proxy is listening to port XXXX" in the log file. By default, the port is 9000.

Access the http://local host:9000/api/status on a web browser and make sure that you can locate "ST_PROXY_READY". This is a confirmation that the Data API Proxy is running properly and ready for a connection from APIs (Eikon Data API, RD Library)

If the Data API Proxy service is failed to start. A general guideline is to restart your machine and the Refinitiv Workspace application. If the problem persists, please contact Refinitiv Helpdesk at https://my.refinitiv.com/ and ask the helpdesk to escalate the ticket to the Technical Service Group including API Proxy and SxS log files and the API log.

2 ) Check Python Libraries

2.1 ) Eikon Data API (EDAPI)

2.1.1 ) Check the version: Run the below code to check the Eikon Data API version.

    	
            

import eikon as ek

print(ek.__version__)

Here is the expected output. As of the time this article is published (March 2023), the API version is 1.1.16

The command below can be run on a command line to upgrade the Eikon Data API Python library to the latest version

    	
            
pip install --upgrade eikon

2.1.2) Enable logging: You can set the log level on Eikon Data API to get additional information by running the following code:

    	
            

import eikon as ek

ek.set_log_level(1) #This is to enable log detail

ek.set_app_key('xxxxxxxxxxxxxxxxxxxxxxxxx') # A valid app key is required.

This is the sample output of API successfully connect to the Data API Proxy

This is the sample output of API unsuccessfully connect to the Data API Proxy

2.1.3) Execute sample code: Once you have verified that API is installed successfully and Eikon Desktop or Refinitiv Workspace with the Data API Proxy service is running properly on your machine. You should be able to use the API. Let's run the following code

    	
            

import eikon as ek

ek.set_app_key('xxxxxxxxxxxxxxxxxxxxxxxxx') # a valid app key is required.

df,e = ek.get_data(['LSEG.L'], ['TR.RIC'])

print(df)

Here is the expected output:

And this is the confirmation that your Eikon Data API is working properly!

2.2 ) Refinitiv Data Library (RD Library)

2.2.1 ) Check the version: Run the below code to check the RD Library version.

    	
            

import refinitiv.data as rd

rd.open_session()

print(rd.__version__)

Here is the expected output. As of the time this article is published (March 2023), the RD Library version is 1.1.1

The command below can be run on a command line to upgrade the RD library - Python to the latest version

    	
            
pip install --upgrade refinitiv-data

2.2.2) Enable logging: You can set the log level on RD Library to get additional information by setting the log level in the configuration file refinitiv-data.config.json, the configuration file can be found in GitHub example of Refinitiv Data Library for Python - Configuration. Set the log level part as below. Then put this file in the same location as the Python script that you're running with the RD Library.

    	
            

     "logs": {

         "level": "debug",

         "transports": {

             "console": {

                 "enabled": true

             },

             "file": {

                 "enabled": true

             }

         }

     },

This is the sample output of API successfully connect to the Data API Proxy

2.2.3) Execute sample code: Once you have verified that API is installed successfully and Eikon Desktop or Refinitiv Workspace with the Data API Proxy service is running properly on your machine. You should be able to use the API. Let's run the following code

    	
            

import refinitiv.data as rd

rd.open_session()

rd.get_data(['LSEG.L'])

Here is the expected output:

Conclusion

This article provides the methods to check and confirm that your API is working properly. Please note that if the Data API Proxy service is failed to start. A general guideline is to restart your machine and the Refinitiv Workspace application. If the problem persists, please contact Refinitiv Helpdesk at MyRefinitiv and ask the helpdesk to escalate the ticket to the Technical Service Group including API Proxy and SxS log files and the API log. Lastly, if you have any further questions regarding Refinitiv's API usage, you can find the solution or raise a new question at our Developer Portal Q&A Forum, which is being monitored by our API expert, please also provide the log file or necessary data into the question for the ease of investigation and suggestion. I hope you're happy and have fun using our API!

  • Register or Log in to applaud this article
  • Let the author know how much this article helped you
If you require assistance, please contact us here