Skip to main content
This page covers how to connect to the Limitless WebSocket API, how to sign the handshake for authenticated channels, and the full list of client and server events. Each subscription has its own page pairing the subscribe call with the payloads it delivers.

Connection

URL: wss://ws.limitless.exchange Namespace: /markets Transport: WebSocket only (no polling fallback)
No client PING required. The server runs the Socket.IO heartbeat (server-initiated ping / client pong) automatically. Every official Socket.IO client (JavaScript, Python python-socketio, Go, Rust) responds to it out of the box. Do not send your own PING frames. Keep the connection open and rely on the built-in heartbeat and the auto-reconnect flow in WebSocket quick start.
Connections close after 24 hours. Our load balancer closes every WebSocket connection 24 hours after it opens, whether or not it is active. The close arrives without a close frame, so your client sees code 1006. Reconnect with freshly signed HMAC headers (the original handshake timestamp is past the 30-second window) and re-emit your subscriptions, since the server does not keep them across connections. The example below and the quick start client both re-sign on reconnect. To avoid a gap, open a second connection shortly before the 24-hour mark and switch over.
Authenticated channels (positions, order events) require an HMAC-signed handshake. Sign a fixed canonical message — {ISO-8601 timestamp}\nGET\n/socket.io/?EIO=4&transport=websocket\n — with the base64-decoded secret and pass three headers as extraHeaders:
See Authentication for how to generate TOKEN_ID and SECRET. If you use an official SDK, prefer its WebSocket client, which signs the handshake automatically from hmacCredentials (TypeScript) / hmac_credentials (Python) / WithHMACCredentials (Go).
Authenticated subscribes must be sent within 30 seconds of the handshake timestamp. The server re-validates the handshake HMAC headers on every subscribe_positions, subscribe_order_events, and subscribe_transactions message and rejects any whose lmts-timestamp is more than 30 seconds from the server clock with an exception carrying Invalid HMAC authentication. Emit these subscriptions immediately after connect. To change an authenticated subscription later (for example to narrow subscribe_positions), open a new connection with freshly signed headers; a re-emit on a connection older than 30 seconds is rejected. Public channels are not affected.

Event reference

There is no authentication confirmation event. A successful authenticated subscribe is acknowledged only by that channel’s system message; a failed one surfaces on exception. The server also handles subscribe_live_sports, subscribe_live_esports, subscribe_ugm_live_offers and unsubscribe_ugm_live_offers. These channels are not documented and are subject to change.

Unsubscribing

There is no generic unsubscribe event. Only two channels have an explicit unsubscribe: unsubscribe_market_lifecycle and unsubscribe_unrealized_pnl. subscribe_market_prices, subscribe_positions, and subscribe_order_events have none. Each of those replaces its previous subscription on the same connection when you emit it again, so to drop a market you re-emit the subscribe with the smaller set (for the authenticated channels, only within 30 seconds of the handshake; otherwise reconnect). To stop everything, disconnect. An unsubscribe event name that the server does not register never gets an acknowledgement, so a client waiting on one times out. Each subscription has its own page pairing the subscribe call with the payloads it delivers:
  • Market data: subscribe_market_prices, newPriceData, orderbookUpdate
  • Positions: subscribe_positions, positions
  • Order events: subscribe_order_events, orderEvent
  • Market lifecycle: subscribe_market_lifecycle, unsubscribe_market_lifecycle, marketCreated, marketUpdated, marketResolved
  • Unrealized PnL: subscribe_unrealized_pnl, unsubscribe_unrealized_pnl, unrealizedPnlProjectionChanged