Unsubscribe from Real-Time Order Book (Depth)

This document describes how to fully cancel or partially cancel product subscriptions without disconnecting the WebSocket connection.

API Description

This document describes how to fully cancel or partially cancel product subscriptions without disconnecting the WebSocket connection.

Request Frequency

For the same WebSocket connection, all requests (subscription, unsubscription, heartbeat) are limited to 60 times per minute. If the request frequency limit is exceeded, the connection will be automatically disconnected. If there are too many disconnections and the system determines it as a malicious request, the API key will be blocked. Please pay attention to the calling logic during use.

Error Code Description

Refer to WebSocket Error Code Description

Endpoint

Please refer to WebSocket Subscription Endpoints

Request (Protocol Code: 11001)

{
    "code": 11001,
    "trace": "423afec425004bd8a5e02e1ba5f9b2b0",
    "data": {
        "codes": "BTCUSDT"
    }
}

Note: The data or codes parameter can be null or empty.

If the codes value cannot be obtained, a full cancellation will be performed. That is, if you have subscribed to the order book of 100 product pairs, all subscription data will be cleared and no further pushes will be made. If the codes value is provided, only the subscription data of the specified products will be cleared, and the data push of other products will not be affected.

Parameter Name
Type
Required
Description
Example Value

code

Integer

Yes

Request protocol code

Protocol code for unsubscribing from real-time order book: 11001

trace

String

Yes

Traceable ID (random string)

423afec425004bd8a5e02e1ba5f9b2b0

data

JSON

No

Unsubscription data

codes

String

No

Products to unsubscribe from (separated by commas for multiple products)

BTCUSDT

Response (Protocol Code: 11010)

Field Name
Type
Required
Description
Example Value

code

Integer

Yes

Response protocol code

Response protocol code for unsubscribing from real-time order book: 11010

trace

String

Yes

Traceable ID passed in the subscription request

423afec425004bd8a5e02e1ba5f9b2b0

msg

String

Yes

Response message

ok

Last updated