Websocket
is a new HTML5 Protocol. It achieves full-duplex data transmission between the client and the server, allowing data to be transferred effectively in both directions. With just only one handshake, the connection between the client and the server is established. The server will then be able to push data to the client according to preset rules. Its advantages include:WebSocket
request header for data transmission between client and server is approximately 2 bytes onlysub
market_$symbol_depth_step0
Subscribe depth
unsub
market_$symbol_depth_step0
Unsubscribe depth
sub
market_$symbol_trade_ticker
Subscribe to real-time trade
unsub
market_$symbol_trade_ticker
Unsubscribe real-time trade
sub
market_$symbol_ticker
Subscribe to 24h market data
unsub
market_$symbol_ticker
Unsubscribe 24h market data
sub
market_$symbol_kline_1min
Subscribe to 1min k-line information
req
market_$symbol_kline_1month
Request 1 month historical bar record
PING
message. The client needs to reply to the PONG
message, otherwise the server will close the connection.