# Introduction

# Access

the base URL of Websocket Market Data :wss://open-ws-swap.bingbon.pro/ws

# 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 of unsubscription is as follows:

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

Confirmation of Unsubscription:

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

Last Updated: 3/25/2021, 6:54:08 PM