Unsubscribe from Order Book Updates
A successful unsubscribed response contains an always-array subscriptions field and is a barrier: UDX sends no later message for any returned subscription ID.
RECEIVE
/wsAuthorization
UDX-Access-KeyAPI key · headerrequiredAPI key signature over `timestamp + "GET" + "/ws"`. The channel binding lists the required upgrade headers.
or
UDX-Access-KeyAPI key · headerrequiredAPI key signature over `timestamp + "GET" + "/ws"`. The channel binding lists the required upgrade headers.
Message
idinteger<int64>requiredClient-assigned command correlation ID, unique among commands in flight on this connection.
min 1 · max 9007199254740991
cmdstringrequiredSelects the unsubscribe command.
paramsobjectrequiredIdentifies the subscriptions to end as a canonical array.
Show propertiesHide properties
sidsinteger<int64>[]requiredCanonical non-empty list of distinct subscription IDs. It remains an array when one subscription is targeted.
min items 1 · max items 250
Channel bindings
wsmethodGETheadersUDX-Access-KeystringrequiredOpaque API key ID.
min length 1 · max length 255
UDX-Access-TimestampstringrequiredUnix time in milliseconds.
max length 13 · matches ^[0-9]{13}$
UDX-Access-SignaturestringrequiredBase64 RSA-PSS/SHA-256 signature.
min length 1 · max length 1024
Sec-WebSocket-ProtocolstringrequiredNegotiated dated WebSocket API version.
Example
wscat -c 'wss://api.uat.udx.underdogsports.com/ws'
> {"id":2,"cmd":"unsubscribe","params":{"sids":[7,8]}}const socket = new WebSocket("wss://api.uat.udx.underdogsports.com/ws");
socket.addEventListener("open", () => {
socket.send(JSON.stringify({
"id": 2,
"cmd": "unsubscribe",
"params": {
"sids": [
7,
8
]
}
}));
});Message
{
"id": 2,
"cmd": "unsubscribe",
"params": {
"sids": [
7,
8
]
}
}