Hello - can someone tell me which api to use for news retrieval and give me a template script to do so from a python ide?
Hi @mbh181 ,
The news can be retrieved by the Python library with the below
Or if you have access to the Refinitiv Workspace/ Eikon Desktop application, you can access the CodeBook application which contains an example folder with the example code to retrieve the news via these APIs
For example, News retrieval via Eikon Data API example is in folder __Examples__/01. Data Retrieval and Discovery/01.04. Eikon Data API/
Hope this helps and please let me know in case you have any further questions.
thanks for this. this worked but now after a few days i am getting an error
'AttributeError: partially initialized module 'eikon' has no attribute 'set_app_key' (most likely due to a circular import)'
I have checked the app key, renewed it in case and tried an upgrade of the eikon library on my machine - without any luck any thoughts?
Hello @mbh181
Did you use the Eikon Data API library?
import eikon as ekek.set_app_key('8e9bxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx1b035d')
Or the https://pypi.org/project/refinitiv-data/ library?
import refinitiv.data.eikon as ekek.set_app_key('XXXXXX')
I recommend you uninstall the library and then re-install the latest version library.
hello @wasin.w i have installed the latest version of the Eikon Data API via pip. i am currently running 1.1.16 and still getting this error. i have reinstalled the latest version. same error msg.
I am sorry to hear that you are facing the issue.
Can you please set up a new fresh Python environment, then install only Eikon Data API and try in Python command line mode? You can see how to set up a Python environment from this Quick Start page.
In the meantime, you can use the Eikon/Workspace "CodeBook" app which is 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, providing access to Refinitiv APIs and other popular Python libraries that are already pre-installed on the cloud.