Bitget APIBitget API
UTAClassic
Legacy Doc
  • Overview
  • API Documentation
  • WebSocket
  • Agent Hub
  • SDK
  • Changelog
Copied to clipboard
Websocket
Public
Private
    Place Order ChannelCancel Order ChannelModify Order ChannelOrder ChannelFill ChannelFast Fill ChannelBatch Place Order ChannelBatch Cancel Order ChannelBatch Modify Order ChannelAccount ChannelPositions ChannelADL Notification ChannelStrategy Order Channel
Reality
SBE
Private

Batch Cancel Order Channel

Description

The ACK response only indicates that the request has been successfully accepted. Please use the WebSocket order push channel to confirm the actual order status of each cancellation.

  • This endpoint allows you to cancel multiple unfilled or partially filled orders across spot, margin, and futures markets via WebSocket.
  • Each request supports cancellation of up to 20 orders.
  • Batch order cancellation allows partial success. Each order in the batch is processed independently — if one cancellation fails, it does not affect the cancellation of the other orders in the same batch.
  • In batch order cancellation, ensure that each call uses only orderId or clientOid for identification, and avoid mixing them. If orderId and clientOid are used together in one call, clientOid will be invalid.
  • Order Identification: Orders can be identified by either orderId or clientOid. When both are provided, orderId takes priority.

Note: Please check the code and msg fields for each order in the response's args list to confirm the result of each cancellation. If the result is unclear, use clientOid or orderId to query the order details.

Code
{ "args": [ { "orderId": "xxxxxxxx" }, { "orderId": "xxxxxxxx" } ], "id": "xxxxx-xxx-xxx-xxxx-xxxxxx", "op": "trade", "topic": "batch-cancel" }

Request Parameters

ParameterTypeRequiredDescription
opStringYesOperation:
trade trade
idStringYesRequest identifier
topicStringYesTopic
batch-cancel
argsList<Object>YesChannel list
> orderIdStringNoOrder ID
Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority
> clientOidStringNoClient order ID
Must match the regular expression ^[0-9A-Za-z_:#\-+\s]{1,32}$, i.e. 1 to 32 characters, consisting of uppercase and lowercase letters, digits, underscores (_), hyphens (-), plus signs (+), colons (:), number signs (#), and spaces
Either clientOid or orderId must be provided. If both are present or do not match, orderId will take priority
Code
{ "event": "trade", "id": "bb553cc0-c1fa-454e-956d-c96c8d715760", "topic": "batch-cancel", "args": [ { "code": "0", "msg": "Success", "orderId": "xxxxxxxxxxxxx", "clientOid": "xxxxxxxxxxxxx", "receiveTime": "1750034396998123", "pushTime": "1750034397076456" }, { "code": "25204", "msg": "Order does not exist", "orderId": "xxxxxxxxxxxxx", "clientOid": "xxxxxxxxxxxxx", "receiveTime": "1750034396999456", "pushTime": "1750034397077789" } ], "code": "0", "msg": "Success", "connId": "xxxxxxxxxx", "rateLimit": [ { "limit": "10", "remaining": "9" } ], "ts": "1751980011084" }

Response Parameters

ParametersTypeDescription
eventStringEvent
trade/error
idStringRequest identifier
topicStringTopic
batch-cancel
argsList<Object>Channel list
> codeStringCode
> msgStringMessage
> orderIdStringOrder ID
> clientOidStringClient order ID
> receiveTimeStringGateway receive time
Unix microsecond timestamp
> pushTimeStringGateway push time
Unix microsecond timestamp
codeStringCode
msgStringMessage
connIdStringConnection ID
rateLimitArrayRate limit balance array
> limitStringRate limit quota for this dimension
> remainingStringRemaining available quota
tsStringTimestamp
Batch Place Order ChannelBatch Modify Order Channel
JSON
JSON