For a deeper look into our Elektron API, look into:

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
13 5 6 4

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:


  1. # Global Default Variables
  2. app_id = '256'
  3. auth_url = 'https://api.refinitiv.com:443/auth/oauth2/v1/token'
  4. hostname = '127.0.0.1'
  5. password = 'PASSWORD WHEN REGISTER MACHINE ID'
  6. position = ''
  7. sts_token = ''
  8. refresh_token = ''
  9. user = 'MY EMAIL ADDRESS'
  10. clientid = 'APP KEY VIA https://emea1.apps.cp.thomsonreuters.com/apps/AppkeyGenerator'
  11. port = '443'
  12. client_secret = ''
  13. scope = 'trapi'
  14. ric = '/TRI.N'
  15. 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.

pythontreprdp-apiwebsocketsrrto
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
11.5k 16 7 10

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.

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.

Upvotes
13k 32 12 18

Hi @g.suhharukov,

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.

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.

@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?

Hi @g.suhharukov,

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.

@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))?

Show more comments
Click below to post an Idea Post Idea