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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles


28 6 6 5

make sure that 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 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 = ''
  4. hostname = ''
  6. position = ''
  7. sts_token = ''
  8. refresh_token = ''
  9. user = 'MY EMAIL ADDRESS'
  10. clientid = 'APP KEY VIA'
  11. port = '443'
  12. client_secret = ''
  13. scope = 'trapi'
  14. ric = '/TRI.N'
  15. service = 'ELEKTRON_DD

and code is from

Where is my problem coming from as it seems I use everything correctly.

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.

18.1k 35 12 12

Hello @g.suhharukov

We do not have the WebSocket API - Refinitiv Real-Time - Optmized connection with R example yet. However, the Service Discovery ( 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 512.0 KiB each and 1.0 MiB total.

17.6k 48 13 19

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 -

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 512.0 KiB each and 1.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 = ''

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 :

Connecting to WebSocket wss:// for session1... 

However, it seems that I should better use "endpoint":"" or "endpoint":"". 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 , while 'discovery' 1) gets refresh token via 2)then searches for endpoint via 3) when endpoint found, then sends market information via wss:// (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