question

Upvotes
Accepted
3 0 0 2

Refinitiv-Data vs Refinitiv-Dataplatform

Hi I'd like to know the difference between these libraries:

https://pypi.org/project/refinitiv-data/

https://pypi.org/project/refinitiv-dataplatform/

Is refinitiv-data a library that includes all the features of dataplatform? I'm also having trouble creating a session with refinitiv-data.

Thanks,

session
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.

Upvote
Accepted
20.3k 73 10 20

Hi @cmarks

refinitiv-data is the replacement for refinitiv-data-platform

refinitiv-data-platform was an alpha release and refinitiv-data is a beta release.

We will be publishing tutorials and examples soon for refinitiv-data

The RD Library product owner will also be issuing a statement in the near future explaining the differences in terms of positioning, support etc


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.

Hi @cmarks

Hopefully towards the end of next week - for both the above...

Ok that's great. I'd like to begin using refinitiv-data if possible, it has a simple async function for data in fundamental_and_reference.Definition. I'm still having trouble connecting. This is my attempt to open a desktop session, but any endpoint would do.

import refinitiv.data as rd
import refinitiv.data.session as sess

sess.desktop.Definition(app_key='your_app_key').get_session()
rd.open_session(app_key='your_app_key')
An error occurred while requesting URL('http://127.0.0.1:9060/api/status').
ConnectError('[WinError 1225] The remote computer refused the network connection')
[2021-11-12 10:20:42,320] - [INFO] - [sessions.desktop.default-session.0] - [28932] | MainThread
Warning: file .portInUse was not found. Try to fallback to default port number.
[2021-11-12 10:20:42,320] - [INFO] - [sessions.desktop.default-session.0] - [28932] | MainThread
Try defaulting to port 9000...
[2021-11-12 10:20:42,323] - [INFO] - [sessions.desktop.default-session.0] - [28932] | MainThread
Checking port 9000 response : 404 - <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot GET /api/status</pre>
</body>
</html>
Try to handshake on url http://localhost:9000/api/handshake...
[2021-11-12 10:20:44,371] - [INFO] - [sessions.desktop.default-session.0] - [28932] | MainThread
Response : 404 - <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/handshake</pre>
</body>
</html>
Upvotes
20.3k 73 10 20

Hi @cmarks

Assuming you have Eikon or Workspace running, the following works fine for me with the latest beta release - refinitiv-data · PyPI v1.0.0b4

import refinitiv.data as rd
from refinitiv.data import session
APP_KEY = '<my app key>'
rd.open_session(app_key = APP_KEY)

# outputs

<refinitiv.data.session._desktop_session.Definition object at 0x278feee7 {name='default-session'}>


Is that what you are after?



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.

My Eikon is running and my app key is enabled. I was using an older version, just updated but its still not working. This is the session object I get

<refinitiv.data.session._desktop_session.Definition object at 0x23a52f3d430 {name='default'}>

And it says there was a response on port 9000, then it chooses a non working port?

[2021-11-12 11:28:56,760] - [INFO] - [sessions.desktop.default.0] - [9252] | MainThread
Try defaulting to port 9000...
[2021-11-12 11:28:58,816] - [INFO] - [sessions.desktop.default.0] - [9252] | MainThread
Default proxy port 9000 was successfully checked
[2021-11-12 11:33:44,657] - [INFO] - [sessions.desktop.default.0] - [27984] | MainThread
Try defaulting to port 36036...
[2021-11-12 11:33:48,750] - [ERROR] - [sessions.desktop.default.0] - [27984] | MainThread
An error occurred while requesting URL('http://localhost:36036/api/status').
ConnectError('[WinError 1225] The remote computer refused the network connection')

I get this error when trying to query data:

res=fr.Definition(['AAPL.O'],['TR.CompanyName']).get_data()
print(res.data.raw)
refinitiv.data._data.errors.RDError: Error code 404 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Cannot POST /api/udf</pre>
</body>
</html>

Figured it out, my desktop app didn't have APIPROXY service running. Platform sessions work fine.

Click below to post an Idea Post Idea