WebSocket Public Market Data Channels

View as Markdown

Use public market channels when an application needs continuously updated prices, trades, candlesticks, or order-book depth without repeatedly polling REST endpoints. These streams can support trading screens, price displays, alerts, and market monitoring.

Connection URL

wss://ws.6mm.com/ws

Public WebSocket does not require authentication.

For connection lifecycle, unsubscribe, ping, and reconnect behavior, see Connection, Subscription & Heartbeat.

Common Channels

ChannelDescription
market.depth.{symbol}Order book depth. Sends a snapshot first, then incremental updates
market.trade.{symbol}Latest trades
market.kline.{symbol}.{interval}Klines
market.ticker.{symbol}Single-symbol ticker summary
market.tickersAll-symbol ticker summary

Choose a channel

Application needChannel
Build or maintain an order bookmarket.depth.{symbol}
Display a live trade feedmarket.trade.{symbol}
Draw a candlestick chartmarket.kline.{symbol}.{interval}
Display one market summarymarket.ticker.{symbol}
Maintain a market overviewmarket.tickers

Subscription Example

1{ "id": "1772007814666", "op": "subscribe", "args": ["market.depth.BTCUSDT"] }

Push Message Wrapper

1{
2 "topic": "market.depth.BTCUSDT",
3 "event": "data",
4 "ts": 1772007815000,
5 "data": {}
6}

Use topic to route each message to the correct handler and ts to observe delivery timing. The data object contains the payload for the subscribed channel.

Order-book handling

The depth channel sends a snapshot first and then incremental updates. Initialize the local book from the snapshot before applying updates. After reconnecting, create a new session, subscribe again, and rebuild the local book from the next snapshot instead of continuing from stale in-memory state.

Production recommendations

  • Generate a unique id for every subscribe, unsubscribe, and ping request.
  • Confirm subscription acknowledgements before treating a channel as active.
  • Resubscribe to every required topic after reconnecting.
  • Keep network reads separate from slower database or UI processing.
  • Monitor disconnect frequency, message-processing lag, and malformed payloads.
  • Use Private User Channel for authenticated account and order updates.