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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
3 0 1 2

We have multiple elektron services running on a given host (delayed, non-delayed, etc.). How do I specify which service the websocket connection will use?

treprdp-apiwebsocketsrrtoconnectionService
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
21.8k 57 14 21

Use the service name as the part of key, when opening the subscription:

{
    "ID": 2,
    "Domain": "MarketPrice",
    "Key": {
        "Name": "IBM.N",
        "Service": "IDN_SELECTFEED"
    },
    "Streaming": true
}
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
3 0 1 5

It's mildly annoying that the "Service" field isn't there in the sample code, even commented out.

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
3 0 1 2

Many thanks - would it be possible to have "Key"=>"Service" and "Key"=>"ServiceId" added to the docs?

@Gurpreet. I notice you also using the "Streaming" field - can that be added also?

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
21.8k 57 14 21

These and dozens of other fields are documented in the EWA developer guide available here.

See the description of Request message structure in Table 12.

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.