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

Overview |  Quickstart |  Documentation |  Downloads |  Tutorials |  Articles

question

Upvotes
Accepted
1 0 0 0

WebSocket API: item request with "Qos"

Hi team,

Is it possible to change the Quality of Service in Item Request message?

We want to control the update rate of prices, for example, receiving the update messages every 2 seconds:

{

"ID": 3,

"Key": {"Name": "HKD=", "Service": "ELEKTRON_DD"},

"Qos": {

"Timeliness": "DelayedUnknown",

"Rate": "TimeConflated",

"RateInfo": 2000,

},

}


But got Status message arguing that "Data":"Suspect","Text":"No servers available that support this QoS."

Does it mean that QoS is not configurable?


Thank you!

elektron#technologywebsocketsqos
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.

1 Answer

· Write an Answer
Upvote
Accepted
84.6k 287 53 77

@ziyow.hong

Thank you for reaching out to us.

Yes, you can specify the required QoS in the request message but the requested service must support that QoS. Otherwise, you will get this error ("No servers available that support this QoS.").

You can use the source directory request message to check the avaialble QoS of the service.

{
    "ID": 2,
    "Domain": "Source",
    "Key": {
        "Filter": 1
    }
}

The response looks like this:

       {
                                "ID": 1,
                                "Action": "Set",
                                "Elements": {
                                    "Name": "ELEKTRON_DD",
                                    "SupportsQoSRange": 0,
                                    "Capabilities": {
                                        "Type": "Array",
                                        "Data": {
                                            "Type": "UInt",
                                            "Data": [
                                                5,
                                                6,
                                                7,
                                                8,
                                            ...
                                            ]
                                        }
                                    },
                                    "QoS": {
                                        "Type": "Array",
                                        "Data": {
                                            "Type": "Qos",
                                            "Data": [
                                                {
                                                    "Timeliness": "Realtime",
                                                    "Rate": "JitConflated"
                                                }
                                            ]
                                        }
                                    },
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.