New posts are disabled while we improve the user experience.

You can browse the site, or for urgent issues, raise a query at MyAccount.

question

Upvotes
Accepted
29 2 7 12

Question about rdp news api

Get a couple of questions and will be great if you can enlighten me. FYI I am operating it in Python environment.

  1. What is the difference between refinitiv.data, refinitiv.dataplatform and eikon
  2. I can use the service quite freely when I have my Refinitiv Workplace logged on, however, how can I use them WITHOUT LOGGING ON the workspace?

a. For refinitiv.data, are there any sample code can show me how to pass in the credentials?

b. For refinitiv.dataplatform, I used sample code as below, wonder for the username and pw is it the same as my workspace id and pw (or I need the machine key?); and for the app key I feel like I can generate unlimited app key in the app, is that it does not really matter as long as I see the owner value the same as my registered email?

import refinitiv.dataplatform as rdp

#Open the session

#Create and open a Platform session to connect directly to the Refinitiv Data Platform

rdp.open_platform_session(

'YOUR APP KEY',

rdp.GrantPassword(

username = 'YOUR RDP UID',

password = 'YOUR RDP PWD'

)

)

c. For eikon, I only see in the sample code that the app key is required via ek.set_app_key. How can I pass in my user credential or if it is not necessary at all?

3. FYI I fail to connect any if my refinitiv workspace is not running. I share the error code I see below, will be great if you can help.

Trying rd

1699597887772.png


Trying rdp

1699597906426.png


Trying eikon and it also have error like "no proxy address identified" etc. I'm not able to upload any more pics.

Thanks team for the help/

#productrdp-apinewsrdp
1699597887772.png (39.7 KiB)
1699597906426.png (41.8 KiB)
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
Accepted
7.5k 18 2 8

Hi @Julian.Bai ,


Thank you for your questions. Let me answer these one by one:

1. What is the difference between refinitiv.data, refinitiv.dataplatform and eikon

Eikon Data API is a Python library which gives access to wide range of data through Desktop session, meaning that you would need to login Eikon/Workspace as it uses the proxy to get the data. Refinitiv Data Platform is a set of endpoints which you can use to access our data both through Desktop and Platform connections/sessions (where you don't need Eikon/Workspace running). RD libraries is our latest library which sits on top of Refinitiv Data Platform and offers ease of use functions to access the data. The latter also offers Desktop and Platform connections. My colleague @jonathan.legrand created a great article on these APIs/libraries and others which explains these in greater detail. You may have a look at it here.

2. I can use the service quite freely when I have my Refinitiv Workplace logged on, however, how can I use them WITHOUT LOGGING ON the workspace?

That is the main difference between Desktop and Platform connections. If you are connected through a Desktop session using desktop licence (with your API key) you need to have Eikon/Workspace running on the background, whereas in Platform session under enterprise license (when you get a Machine ID as well) you can get the data without logging into Eikon/Workspace.

a. For refinitiv.data, are there any sample code can show me how to pass in the credentials?

You can find examples for configuring and requesting data via rd libraries in our GitHub repo. Generally to connect refinitiv.data via desktop session you would need to import the library and run rd.open_session(). You don't need to pass API key (which you should in case of Eikon) as it will fetch directly from Eikon/Workspace running on the background.

b. For refinitiv.dataplatform, I used sample code as below, wonder for the username and pw ...

The username and password for the example above are the Machine ID and password which you will get if you have enterprise license with us. You can talk to your account manager if you need one.

c. For eikon, I only see in the sample code that the app key is required via ek.set_app_key. How can I pass in my user credential or if it is not necessary at all?

To use Eikon you need the API key only

3. FYI I fail to connect any if my refinitiv workspace is not running. I share the error code I see below, will be great if you can help.

As you could infer from my answers above you can't access the libraries in desktop session without Eikon/Workspace running on the background.


Hope this provides an answer to your question, please let me know should you have any further questions.


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.

Hi Haykaz, thanks for the detailed answer. Just a follow up question, if I'd use machine id in question b, then 'YOUR APP KEY' should be replaced by my machine id, is that correct?

Hi @Julian.Bai , no you need both, the username is going to be the machine ID and the password should be your password associated with the Machine ID which you set up once you receive the Machine ID.
Upvotes
1 0 0 1

A follow up question on this as I am the original question raiser why Julian just helps me paste here

I follow the instructions to use the open_platform_session function in rdp to build up the session like below:

import refinitiv.dataplatform as rdp
session = rdp.open_platform_session(AppKey,
rdp.GrantPassword(
username = 'GE-A-00895797-3-14157',
password = machineID_PW
))

However it fails to establish a connection where the system report me timeout error like below. any thoughts?

ERROR!!! An error occurred while requesting URL('https://api.refinitiv.com/data/news/v1/headlines?query=R%3A2269.HK+daterange%3A%222022-06-20+11%3A00%3A39%2C2022-06-21+15%3A19%3A29%22&number=10').
     ConnectTimeout('')


---------------------------------------------------------------------------
CancelledError                            Traceback (most recent call last)
~\AppData\Roaming\Python\Python310\site-packages\httpcore\backends\asyncio.py in connect_tcp(self, host, port, timeout, local_address)
    108             with anyio.fail_after(timeout):
--> 109                 stream: anyio.abc.ByteStream = await anyio.connect_tcp(
    110                     remote_host=host,
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.

To clarify I am trying to set up a platform connections so I do not need the workspace running on my machine.That's why I am using the rdp library.
Upvotes
1 0 0 1

Hi may anyone help on the above issue?

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.

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.