Subscribe to Order Book Updates
UDX validates and reserves the complete batch before assigning one subscription ID per ticker. The single subscribed response contains an always-array subscriptions field and is enqueued before any sequenced data for the returned subscriptions. Each subscription becomes ready only when its own initial snapshot arrives. Retrying an exact batch on the same connection returns its existing subscription IDs without a second delivery; a partial overlap is rejected atomically.
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 subscribe command.
paramsobjectrequiredMarkets and common L2 view requested for independent subscriptions. Any ticker in the caller-visible public market catalog is subscribable regardless of market status. Lifecycle transitions do not end the subscription; removal from that catalog does.
Show propertiesHide properties
channelsstring[]requiredThe initial protocol supports only the order book channel.
min items 1 · max items 1
tickersstring[]requiredA canonical non-empty list of distinct market tickers. The protocol ceiling is 250; an operational profile may impose a lower limit.
min items 1 · max items 250
levelstringAggregated market-by-price depth. Later protocol versions may add L1 or entitled L3 without changing this version's closed schema.
default: "L2"
depthintegerMaximum visible levels per side; omission requests 25.
min 1 · max 25 · default: 25
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":1,"cmd":"subscribe","params":{"channels":["orderbook"],"tickers":["UDX-EXAMPLE-MARKET-A","UDX-EXAMPLE-MARKET-B"],"level":"L2","depth":10}}const socket = new WebSocket("wss://api.uat.udx.underdogsports.com/ws");
socket.addEventListener("open", () => {
socket.send(JSON.stringify({
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook"
],
"tickers": [
"UDX-EXAMPLE-MARKET-A",
"UDX-EXAMPLE-MARKET-B"
],
"level": "L2",
"depth": 10
}
}));
});Message
{
"id": 1,
"cmd": "subscribe",
"params": {
"channels": [
"orderbook"
],
"tickers": [
"UDX-EXAMPLE-MARKET-A",
"UDX-EXAMPLE-MARKET-B"
],
"level": "L2",
"depth": 10
}
}