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

  • @Ilya Vasserdam 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.

  • Glad to be able to help.

  • Hello,


    I am a developper at Walnut Algorithm I have some questions about Elektron via Websocket.

    Today we use a delayed stream to test the service. For instance I can subscribe to /TOTF.PA but cannot subscribe to TOTF.PA. The problem is the stream appears to be JITConflated and I cannot see if the events will be effectively split as they are when we request extraction on TRTH.

    1/ As the Elektron mechanism is to send only updates which occured in fields I wonder if we can receive all Quote and Trade events occuring in the same micro seconds (we can see this happens on TRTH datascope extraction) ?

    2/ What is the best practice dynamically subscribe & unsubscribe to data with the websocket ? Get one websocket by instrument and keep the same when we have to subscribe to new instrument or use a new one for each subscription ?

    3/ Also I would like to know how it works behind. I mean, does the websocket toggle in conflated mode if we don't call ReceiveAsync at a sufficent pace ? Or It is independent and messages are queued on server side ?