Elektron. WebSocket. ServiceId

Hi.

My request

{"ID":2,"Key":{"Name":"TRI.N","ServiceId":10002}}

I got this error

Request Rejected: Request key did not contain service Id.

Why?

Best Answer

Answers

  • @developer_deprecated_0 Where did you get the parameter ServiceID. Its not documented anywhere in the message description.

    Try omitting this key/value pair and try again.

    Websocket Request Message

  • @Gurpreet

    {"ID":2,"Key":{"Name":"TRI.N"}}
    [{"ID":2,"Type":"Status","Key":{"Name":"TRI.N"},"State":{"Stream":"Closed","Data":"Suspect","Code":"AlreadyOpen","Text":"Request Rejected: Request key did not contain service Id."}}]

    I got this parameter from RSSL protocol.

  • The websocket protocol is different from RSSL protocol. Can you confirm that you are referring to the new Elektron Websocket API, and not the old RIS/TRIS API.

    Even with the new EWA, I see some old reference to the ServiceId, which seem to have been removed/replaced with Service now. Can you try your request using the key Service instead. Also, can you please confirm that you have the latest version of ADS running.

  • I added the serviceId only because of the error text. I did not see any mention of serviceid(or service) for websocket. {"ID":2,"Key":{"Name":"TRI.N","Service":"10002"}} . I got access 4 apr. I think he is the last. (WebSocket protocol, logon - OK)<br>I can clarify if necessary. ADS????
  • Sorry. Other error.

    [{"ID":2,"Type":"Error","Text":"JSON Unexpected Value. Received 'hdEDD' for key 'Service'","Debug":{"File":"Converter/jsonToRwfSimple.C","Line":7434,"Offset":41,"Message":"{\"ID\":2,\"Key\":{\"Name\":\"TRI.N\",\"Service\":\"hdEDD\"}}"}}]

  • You will have to confirm from your market data administrator, if the Service "hdEDD" is configured for websocket access in your ADS server.