# Websocket Introduction

# Access

The base URL of Websocket Market Data is: wss://open-api-ws.bingx.com/market

# Data Compression

All response data from Websocket Server are compressed into GZIP format. Clients have to decompress them for further use.

# Heartbeats

Once the Websocket Client and Websocket Server get connected, the Server will send a heartbeat-Ping message every 5 seconds (the frequency might change).

When the Websocket Client receives this heartbeat message, it should return Pong message.

# Subscriptions

After successfully establishing a connection with the Websocket Server, the Websocket Client sends the following request to subscribe to a specific topic:

{ "id": "id1", "reqType": "sub", "dataType": "data to sub" }

After a successful subscription, the Websocket Client will receive a confirmation message:

{ "id": "id1", "code": 0, "msg": "" } After that, once the subscribed data is updated, the Websocket Client will receive the update message pushed by the Server

# Unsubscribe

The format to unsubscribe is as follows:

{ "id": "id1", "reqType": "unsub", "dataType": "data to unsub" }

Confirmation of Unsubscription:

{ "id": "id1", "code": 0, "msg": "" }

# symbol Description

The symbol must all be capitalized

Last Updated: 4/22/2022, 12:58:16 PM