Subscribe to real-time market data — instruments, tickers, order books, trades, and candles — without API credentials.
Public channels stream market data and require no authentication. The WebsocketClient automatically routes public subscriptions to the correct public WebSocket endpoint for your chosen market.
All channel data arrives on the update event. The payload includes the arg that was used to subscribe and the data array with the update, plus a wsKey identifying the connection.
wsClient.on('update', (data) => { // data.arg.channel identifies which channel sent the update // data.data contains the array of updated records // data.wsKey identifies the underlying connection switch (data.arg.channel) { case 'tickers': console.log('Ticker update:', data.data); break; case 'trades': console.log('Trade update:', data.data); break; case 'books': console.log('Order book update:', data.data); break; default: console.log(`Update from ${data.arg.channel}:`, data.data); }});
The client automatically determines whether a channel belongs to the public or business endpoint and routes the subscription accordingly. You do not need to manage connection types manually.