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!

Best Answer

  • Jirapongse
    Answer ✓

    @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"
                                                    }
                                                ]
                                            }
                                        },