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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
36 1 2 4

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?

elektron-sdktreprdp-apiwebsocketsrrto
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.

Upvote
Accepted
36 1 2 4

Hi,Gurpreet.

I incorrectly filled the value of Position. Now everything is ok, thanks.

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.

Glad to be able to help.

Upvotes
14.7k 39 12 18

@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

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.

Upvotes
36 1 2 4

@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.

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.

Upvotes
14.7k 39 12 18

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.

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.

Upvotes
36 1 2 4
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????
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.

Upvotes
36 1 2 4

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\"}}"}}]

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.

Upvote
14.7k 39 12 18

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

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.