question

Upvotes
Accepted
1 0 0 1

Python: "import eikon" works, "import refinitiv.data" runs but returns no data

I am new to the api and trying to figure it out. I have Workspace and was able to create an api key which I have been testing on my own Python programs successfully, so long as the sample code is based on:

import eikon as ek

However, when I try to recreate code that is based on the import:

import refinitiv.data as rd

Calls for data always are returned as empty. If I run the python program though Jupytr notebooks within Codebook in Workspace, the refinitiv.data import is able to compile without error, but when calls returns nothing at all.


For instance, if I try to use one of the pieces of example code from the __Examples__ directory, If merely run the code snippets without changing anything they return a blank square rather than the data they are expected to.


Does anyone have any idea why this would be happening? This wouldn't be a problem so long as there were code for everything using the eikon import, but most of the code seems to be bsed on refinitiv.data

workspaceworkspace-data-api#technology
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.

@nathan03

Hi,

Thank you for your participation in the forum.

Are any of the replies below satisfactory in resolving your query?

If yes please click the 'Accept' text next to the most 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. If you have any further questions, please raise it as a new post.

Thanks,
AHS

Upvotes
Accepted
5k 16 2 7

Hi @nathan03 ,


Thanks for sharing this, I think there might be an issue with Workspace app itself. Could you please kindly open About LSEG Workspace as shown below:

screenshot-2023-11-27-at-100247.png

Then please check for errors under System Status, Streaming and and Data API Proxy?

screenshot-2023-11-27-at-100525.png

And if you see any errors It could be the problem on the desktop application so you need to contact Refinitiv LSEG support directly via MyRefinitiv to verify what the problem is.


Additionally, if you don't see any errors there as well, it means you are note permissioned to real time feed and either need to add "/" in front of the RIC (in Codebook only), e.g "/AAPL.O" to access delayed data or obtain access to the real time streaming data by talking to your Account Manager.


Best regards,

Haykaz


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
5k 16 2 7

Hi @nathan03 ,


Can you please kindly run this in a single notebook cell within Codebook and send the logs?

import refinitiv.data as rd

rd.get_config().set_param(
    param=f"logs.transports.console.enabled", value=True
)
session = rd.open_session()
session.set_log_level("DEBUG")
rd.get_data('AAPL.O', fields = 'TRDPRC_1')


Best regards,

Haykaz

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.

Output.txt

Thanks again

output.txt (9.4 KiB)
@aramyan.h I linked the output in my other comment because it was too large to post directly. That code did indeed cause an error

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.