- Last update: May 2022
- Environment: Windows
- Compiler: Conda distribution, Python
- Prerequisite: Refinitiv Eikon or Refinitiv Workspace application with access to Eikon Data APIs and RDP
This workflow shows how to use the Eikon SCREENER application with the Eikon Data API and Refinitiv Data Platform Library for Python together.
The example Notebook application use the Eikon SCREENER application with the Eikon Data API find the companies based on SCREENER query, then finds the Bonds that issued by the company with Refinitiv Data Platform Library for Python Search function, and finally gets the Environmental, Social, and Governance (ESG) data of the Bonds via the Eikon Data API.
This example requires the following dependencies software and libraries.
- Refinitiv Eikon or Refinitiv Workspace application with access to Eikon Data APIs and RDP Library for Python
- For JupyterLab user only, Python Anaconda or MiniConda distribution/package manager.
- Access to Refinitiv Workspace/Eikon CodeBook application (or alternatively, the JupyterLab application)
- Internet connection.
Note:
- This Project has been qualified with Python version 3.9.12 and Conda version 4.10.1
Please contact your Refinitiv's representative to help you to access Refinitiv Workspace/Eikon and Refinitiv Data Platform credentials.
- For JupyterLab user, you can generate/manage the AppKey by follow the steps in Eikon Data API Quick Start page.
- For JupyterLab user, please follow the steps on the Getting Started for User ID section of Getting Start with Refinitiv Data Platform to setup your RDP credentials.
This example project contains the following files and folders
- CodeBook/ESG_Screener_RDP_Search.ipynb: The CodeBook workflow application file.
- CodeBook/ESG_Screener.ipynb: The CodeBook SCREENER example application file.
- JupyterLab/jupyterlab_ESG_Screener_RDP_Search.ipynb: The JupyterLab workflow application file.
- JupyterLab/ESG_Screener.ipynb: The JupyterLab SCREENER example application file.
- requirements.txt: The project dependencies configuration file (for JupyterLab only).
- LICENSE.md: Project's license file.
- README.md: Project's README file.
- images: Project images folder.
For JupyterLab user only: please follow a step-by-step guide to set up your Eikon Data API and your AppKey in Eikon Data API Quick Start page.
If you are Refinitiv Workspace or Eikon user, you can access CodeBook, the cloud-hosted Jupyter Notebook development environment for Python scripting from the application. The CodeBook is natively available in Refinitiv Workspace and Eikon as an app (no installation required!!), providing access to Refinitiv APIs that are already pre-installed on the cloud.
You can upload the CodeBook/ESG_Screener_RDP_Search.ipynb and CodeBook/ESG_Screener.ipynb notebook application files to the your CodeBook with the following steps:
-
In the Eikon/Workspace application, search for the
CodeBook
(orCODEBK
). -
Once the CodeBook finished initialize, click the upload button and select the ESG_Screener_RDP_Search.ipynb or ESG_Screener.ipynb notebook file.
Please see more detail regarding the CodeBook app in this Use Eikon Data API or RDP Library in Python in CodeBook on Web Browser article.
Please note that the Refinitiv Workspace/Eikon application integrates a Data API proxy that acts as an interface between the Eikon Data API Python library and the Eikon Data Platform. For this reason, the Refinitiv Workspace/Eikon application must be running when you use the Eikon Data API Python library.
The first step is to unzip or download the example project folder into a directory of your choice, then set up a Conda environment for running the application with the steps below.
- Open Anaconda Prompt and go to the project's folder
- Run the following command in the Anaconda Prompt application to create a Conda environment named ESG_Bonds_Search for the project.
(base) $>conda create --name ESG_Bonds_Search python=3.9
- Once the environment is created, activate Conda environment named
ESG_Bonds_Search
with this command in Anaconda Prompt.(base) $>conda activate ESG_Bonds_Search
- Run the following command to install the Eikon Data API, RDP Library for Python, JupyterLab application, and all dependencies in the ESG_Bonds_Search environment (Reference)
(ESG_Bonds_Search) $>pip install -r requirements.txt
- Once the dependencies installation process success, Set up your OS Environment variables with the following variables and values.
RDP_USERNAME=YOUR_RDP_USERNAME RDP_PASSWORD=YOUR_RDP_PASSWORD RDP_APP_KEY=YOUR_RDP_APP_KEY_HERE EIKON_APP_KEY=YOUR_EIKON_APP_ID_HERE
- Alternatively, create a file name
.env
with the following variables and values.If you are choosing this way, do not add the#RDP RDP_USERNAME=YOUR_RDP_USERNAME RDP_PASSWORD=YOUR_RDP_PASSWORD RDP_APP_KEY=YOUR_RDP_APP_KEY_HERE # Eikon Data API EIKON_APP_KEY=YOUR_EIKON_APP_ID_HERE
.env
to your version control/Git repository. - Open and log in Refinitiv Workspace/Eikon application with your Workspace/Eikon credential.
- In the current Anaconda Prompt, go to the project's JupyterLab folder. Run the following command to start the JupyterLab application in the JupyterLab folder.
(ESG_Bonds_Search) $>JupyterLab>jupyter lab
You can find more detail regarding the Eikon Data APIs, RDP Library for Python and related technologies from the following resources:
- Refinitiv Eikon Data API page on the Refinitiv Developer Community web site.
- Eikon Data API Quick Start Guide page.
- Eikon Data API Tutorial page.
- Python Quants Video Tutorial Series for Eikon API.
- Eikon Data APY Python Reference Guide.
- Eikon Data API Troubleshooting article.
- Refinitiv Data Platform (RDP) Libraries on the Refinitiv Developer Community web site.
- RDP Libraries Quick Start Guide page.
- RDP Libraries Tutorial page.
- Discover our Refinitiv Data Platform Library (part 1).
- Discover our Refinitiv Data Platform Library (part 2).
- Find Your Right Companies with SCREENER.
- Building Search into your Application Workflow.
- Debt Structure Analysis on an Organizational Level.
For any question related to this example or Eikon Data API, please use the Developers Community Q&A Forum - Eikon Data API.
For any question related to this example or Eikon Data API, please use the Developers Community Q&A Forum - Refinitiv Data Platform.