Skip to content
UDX
Esc
↑↓navigate↵open⌘Jpreview

Stream Order Book Data

Each one-ticker subscription has its own gap-detecting sequence. A terminal subscription error ends only that subscription; a connection-fatal condition is reported with a WebSocket close frame. Absolute updates are idempotent and consumers deduplicate by (sid, seq); a forward gap requires the snapshot recovery procedure above.

SEND/ws
Authorization
UDX-Access-KeyAPI key · headerrequired
API key signature over `timestamp + "GET" + "/ws"`. The channel binding lists the required upgrade headers.
or
UDX-Access-KeyAPI key · headerrequired
API key signature over `timestamp + "GET" + "/ws"`. The channel binding lists the required upgrade headers.
Message: Order Book Snapshot
typestringrequired
Identifies a complete order book snapshot.
sidinteger<int64>required
Opaque server-assigned subscription ID whose lifetime is this WebSocket connection.
min 1 · max 9007199254740991
seqinteger<int64>required
Gap-detection sequence local to one-ticker subscription. It starts at 1 and increments once for every snapshot or update.
min 1 · max 9007199254740991
msgobjectrequired
Complete visible L2 order book state for one market.
Show properties
tickerstringrequired
A market's public ticker.
min length 1 · max length 128
bidsany[][]required
Bid levels in best-first order as `[price, quantity]` pairs.
max items 25
asksany[][]required
Ask levels in best-first order as `[price, quantity]` pairs.
max items 25
Message: Order Book Update
typestringrequired
Identifies an incremental order book update.
sidinteger<int64>required
Opaque server-assigned subscription ID whose lifetime is this WebSocket connection.
min 1 · max 9007199254740991
seqinteger<int64>required
Gap-detection sequence local to one-ticker subscription. It starts at 1 and increments once for every snapshot or update.
min 1 · max 9007199254740991
msgobjectrequired
One market's complete visible transition between book states.
Show properties
tickerstringrequired
A market's public ticker.
min length 1 · max length 128
changesobject[]required
Absolute price-level replacements applied atomically. Array order has no meaning; a zero quantity removes the level.
min items 1 · max items 100
Show properties
Array of object
sidestringrequired
`buy` is bid liquidity and `sell` is ask liquidity, both for YES.
Allowed:buysell
pricestringrequired
YES-side price in dollars as an exact fixed-point decimal string with at most six decimal places.
max length 24 · matches ^[0-9]+(\.[0-9]{1,6})?$
quantitystringrequired
Contract quantity as an exact fixed-point decimal string with at most two decimal places. Zero removes an updated price level.
max length 24 · matches ^[0-9]+(\.[0-9]{1,2})?$
Message: Subscription Error
typestringrequired
Identifies a terminal subscription failure.
sidinteger<int64>required
Opaque server-assigned subscription ID whose lifetime is this WebSocket connection.
min 1 · max 9007199254740991
msgobjectrequired
Closed set of terminal failures for an order book subscription.
Show properties
One of:
object
codestringrequired
Stable machine-readable error code.
detailstringrequired
Human-readable occurrence detail that clients must not parse.
min length 1 · max length 500
instancestring<uri-reference>required
Request ID for troubleshooting with UDX support.
max length 100 · matches ^urn:request-id:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
object
codestringrequired
Stable machine-readable error code.
detailstringrequired
Human-readable occurrence detail that clients must not parse.
min length 1 · max length 500
instancestring<uri-reference>required
Request ID for troubleshooting with UDX support.
max length 100 · matches ^urn:request-id:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
object
codestringrequired
Stable machine-readable error code.
detailstringrequired
Human-readable occurrence detail that clients must not parse.
min length 1 · max length 500
instancestring<uri-reference>required
Request ID for troubleshooting with UDX support.
max length 100 · matches ^urn:request-id:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
Channel bindings
ws
methodGET
headers
UDX-Access-Keystringrequired
Opaque API key ID.
min length 1 · max length 255
UDX-Access-Timestampstringrequired
Unix time in milliseconds.
max length 13 · matches ^[0-9]{13}$
UDX-Access-Signaturestringrequired
Base64 RSA-PSS/SHA-256 signature.
min length 1 · max length 1024
Sec-WebSocket-Protocolstringrequired
Negotiated dated WebSocket API version.
Example
# Prints each message as it arrives
wscat -c 'wss://api.uat.udx.underdogsports.com/ws'
Message
{
  "type": "orderbook_snapshot",
  "sid": 7,
  "seq": 1,
  "msg": {
    "ticker": "UDX-EXAMPLE-MARKET-A",
    "bids": [
      [
        "0.45",
        "100"
      ]
    ],
    "asks": [
      [
        "0.47",
        "80"
      ]
    ]
  }
}