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