WebSocket API is a convenient tool for obtaining real–time data. You can receive orderbook updates, ongoing orders, kline information and ticker information in real time.Currently, there are 4 types of subscriptions and 2 requests to the WebSocket API.
Every once in a while, the server will send a PING message. The client needs to reply to the PONG message, otherwise the server will close the connection.