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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
16 1 3 4

RRT websocket login messages

I have noticed that when we try to send a new login message to the RRT websocket session, the session is often closed by the remote party. I suspect this is due to a malformed login message sent by us. An example login we might send is:

SENT on wss://eu-west-1-aws-1-sm.optimized-pricing-api.refinitiv.net/WebSocket:

{ "ID": 1, "Domain": "Login", "Key": { "NameType": "AuthnToken", "Elements": { "ApplicationId": "256", "Position": "10.121.25.73", "AuthenticationToken": <authtoken> } } }


I have a copy of the documentation `WEBSOCKET API FOR PRICING STREAMING AND REAL-TIME SERVICES PROTOCOL SPECIFICATION AND DEVELOPERS GUIDE`, but it is very light on detail when it comes to login and authentication.


The specific questions I think will allow me to solve this are:

* When my authentication token expires, is it correct to send a new Login message on the same stream ID with Type Refresh?

* Does the Login stream always have to be on ID 1?

* If I receive a response to a login telling me that the Login stream is closed (Stream State Error), how should I recover from that? Do I need to disconnect from the websocket?


If you have any documentation better than the one I mention above it would be great if you could direct me to it. I am aware of the example code but that does not clarify these points either.

Many thanks

refinitiv-realtime
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.

hello @b ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS


hello @b ,

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?
If so please can you click the 'Accept' text next to the appropriate reply? This will guide all community members who have a similar question.

Thanks,
AHS


@b

Hi,

Please be informed that a reply has been verified as correct in answering the question, and marked as such.

Thanks,

AHS

1 Answer

· Write an Answer
Upvotes
Accepted
17.2k 82 39 63

Hi @b

If you haven't already, I suggest you refer to the Developer Community for details related to connecting and logging into a WebSocket server. You will find examples demonstrating connecting, login, and login refresh details.

To answer your specific question, when you refresh your token, you need to provide the "Refresh" indicator, i.e.

{ 
    "ID": 1, 
    "Domain": "Login", 
    "Key": 
    { 
        "NameType": "AuthnToken", 
        "Elements": 
        { 
             "ApplicationId": "256", 
             "Position": "10.121.25.73", 
             "AuthenticationToken": <authtoken> 
        } 
    },
    "Refresh" = false 
} 
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.