make sure that api.refinitiv.com is used for Service Discovery

Recently I received a message from Refinitiv stating "
Your account has been identified as not using the correct service for Refinitiv Real-Time – Optimized, formally known as Elektron Real-Time in Cloud pursuant to Product Change Notification (PCN 12343)...
, please make sure that you are using service discovery via the api.refinitiv.com to guarantee that you are always connecting to the most up to date hostnames for your real-time service. If you wish to continue to surpass service discovery, you can follow this guide. "
When I am running code I have following inputs:
- # Global Default Variables
- app_id = '256'
- auth_url = 'https://api.refinitiv.com:443/auth/oauth2/v1/token';
- hostname = '127.0.0.1'
- password = 'PASSWORD WHEN REGISTER MACHINE ID'
- position = ''
- sts_token = ''
- refresh_token = ''
- user = 'MY EMAIL ADDRESS'
- clientid = 'APP KEY VIA https://emea1.apps.cp.thomsonreuters.com/apps/AppkeyGenerator'
- port = '443'
- client_secret = ''
- scope = 'trapi'
- ric = '/TRI.N'
- service = 'ELEKTRON_DD
and code is from https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/python/market_price_authentication.py
Where is my problem coming from as it seems I use everything correctly.
Best Answer
-
Hello @g.suhharukov
We do not have the WebSocket API - Refinitiv Real-Time - Optmized connection with R example yet. However, the Service Discovery (https://api.refinitiv.com/streaming/pricing/v1/) is just the RDP REST API call (GET operation), so you can use the R language to send a request message to the API endpoint.
You can find examples of how to use R to request REST API on Refinitiv Data Platform Historical R Example.
0
Answers
-
Please use the Service Discovery example from that Repo, instead of the one you are using. Here is the link to it - https://github.com/Refinitiv/websocket-api/blob/master/Applications/Examples/RDP/python/market_price_edpgw_service_discovery.py
Update: I noticed that you are using the email address as the login username. Please use the Machine ID provided in the welcome email instead. Email ID is only provided for testing with API Playground and applications should use the machine ID instead. It usually starts with GE-XXXXXXXX.
0 -
@Gurpreet Thank you for the reply. Indeed, user name should be Machine ID. I see that difference lies in this line
discovery_url = 'https://api.refinitiv.com/streaming/pricing/v1/';
and subsequent codes using this line. However, I am using R code, and in this folder there is no 'discovery' file. Or in R there is no option for using this discovery URL?
0 -
You will have to use the httr package to get the list from this url. The response is a list of URL's that you can connect to - so pick the one that is closest to your geographic region - e.g. in US it will be us-east etc.
The httr package is easy to use, and is documented here.
0 -
@Gurpreet in example when doing it Python I got following URL when connecting to https://api.refinitiv.com/streaming/pricing/v1/ :
Connecting to WebSocket wss://apac-3-t3.streaming-pricing-api.refinitiv.com:443/WebSocket for session1...
However, it seems that I should better use "endpoint":"emea-1-t3.streaming-pricing-api.refinitiv.com" or "endpoint":"emea-3-t3.streaming-pricing-api.refinitiv.com". Using apac-3-t3 I also Received messaged from Refinitiv. Which is better to use?
Is the difference of 'regular' and 'discovery' code in the fact that 'regular' gets refresh token and sends a market information message (connects to websocket) via only https://api.refinitiv.com:443/auth/oauth2/v1/token , while 'discovery' 1) gets refresh token via https://api.refinitiv.com:443/auth/oauth2/v1/token 2)then searches for endpoint via https://api.refinitiv.com/streaming/pricing/v1/ 3) when endpoint found, then sends market information via wss://apac-3-t3.streaming-pricing-api.refinitiv.com:443/WebSocket (in My case) (connects to websocket via this link)?
I.e. If my steps for 'discovery' code are correct and I know my endpoint, can I use only steps 1) and 3) to get the market information (connect to websocket) (in set 3) the endpoint is manually written, to avoid step 2))?
0 -
Yes, there is difference in discovery code in that it "discovers the endpoints". We can change endpoints without notice.
You will have to pick the region which best represents you. The python sample is defaulting to amers. Choose emea or apac if you are in Europe or Asia Pacific region.
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 685 Datastream
- 1.4K DSS
- 616 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 252 ETA
- 557 WebSocket API
- 38 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 653 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛