Channel Subscription

The following data can be sent via WebSocket to initiate a subscription or unsubscription of data streams. An example is shown below.

The id in the response content is a string, which serves as the unique identifier for incoming and outgoing information.

Subscribe to a feed

Request

{
  "method": "SUBSCRIBE",
  "params": [
    "!marginRate@arr",
    "btcusdt@depth100"
  ],
  "id": "1"
}

Response

{
    "id": "1",
    "result": null
}


Unsubscribe from a feed

Request

{
  "method": "UNSUBSCRIBE",
  "params": [
    "!marginRate@arr"
  ],
  "id": "1"
}

Response

{
    "id": "1",
    "result": null
}


Subscribed information flow

Request

{
  "method": "LIST_SUBSCRIPTIONS",
  "id": "1"
}

Response

{
    "id": "1",
    "result": [
        "!marginRate@arr",
        "btcusdt@depth100"
    ]
}