Skip to main content

Connecting to Futures WebSockets

Public market-data sockets for futures use Socket.IO v4 with a single namespace per exchange.

Connection details​

TypeSocket.IO
Versionv4
Base URLwss://ws.coinswitch.co/
Handshake path/pro/realtime-rates-socket/futures/{exchange}

{exchange} in the handshake path is exchange_2 (lowercase).

Namespace​

ExchangeNamespace
EXCHANGE_2/exchange_2 (lowercase in the namespace)

Subscription protocol​

Each event (Order Book, Ticker, Trades, KLines) follows the same shape:

  1. Connect to the namespace.
  2. emit the event name with a subscribe payload that includes the symbol you care about.
  3. The server pushes updates back on the same event name.

Symbol convention​

Most futures WebSocket events use the same BASEUSDT format as REST (e.g. BTCUSDT).

The KLines event is special — it uses SYMBOL_INTERVAL (e.g. BTCUSDT_5 for 5-minute candles). See the KLines page for details.

Authentication​

Public market-data sockets are unauthenticated — anyone with the URL can subscribe.

User-data sockets (Order updates, Position updates) aren't available on Futures today.

Next​

  • Order Book — real-time depth snapshots
  • Ticker — last price + funding + open-interest pushes
  • Trades — real-time trade prints
  • KLines — real-time candles, with the special SYMBOL_INTERVAL subscription pattern