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.
- What is the difference between refinitiv.data, refinitiv.dataplatform and eikon
- 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
Trying rdp
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/
Best Answer
-
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
0
Answers
-
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?
0 -
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.0
-
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,0 -
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.0
-
Hi may anyone help on the above issue?
0
Categories
- All Categories
- 6 AHS
- 37 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛