Stockbit Research research Playground @hansputera

Social WebSocket (wss://wssocial.stockbit.com)

Connection

wss://wssocial.stockbit.com?wskey=<websocket_key>

Protocol

Uses a different internal message structure with typed envelopes:

enum WsMessageType {
  TYPE_PING = "TYPE_PING",
  TYPE_ERROR = "TYPE_ERROR",
  TYPE_BROADCAST = "TYPE_BROADCAST",
  TYPE_SUBSCRIBE = "TYPE_SUBSCRIBE",
  TYPE_UNSUBSCRIBE = "TYPE_UNSUBSCRIBE",
}

enum ChatMessageType {
  TYPE_CHAT_MESSAGE = "TYPE_CHAT_MESSAGE",
  TYPE_CHAT_ROOM_INFO = "TYPE_CHAT_ROOM_INFO",
  TYPE_CHAT_TYPING_INDICATOR = "TYPE_CHAT_TYPING_INDICATOR",
}

Messages are protobuf-encoded binary frames with these type indicators.

Ping

Ping interval: 20 seconds (WEBSOCKET_WS_SOCIAL_PING_INTERNAL) Timeout: 20 seconds