Skip to main content

Cancel All Orders

Cancel all open orders

HTTP Request

POST /v5/spread/order/cancel-all

Request Parameters

ParameterRequiredTypeComments
symbolfalsestringSpread combination symbol name
  • When a symbol is specified, all orders for that symbol will be cancelled regardless of the cancelAll field.
  • When a symbol is not specified and cancelAll=true, all orders, regardless of the symbol, will be cancelled
cancelAllfalsebooleantrue, false
info

The acknowledgement of cancel all orders request indicates that the request was sucessfully accepted. This request is asynchronous so please use the websocket to confirm the order status.

Response Parameters

ParameterTypeComments
listarray<object>
> orderIdstringOrder ID
> orderLinkIdstringUser customised order ID
successstringThe field can be ignored

Request Example

POST /v5/spread/order/cancel-all HTTP/1.1
Host: api-testnet.bybit.com
X-BAPI-SIGN: XXXXXX
X-BAPI-API-KEY: XXXXXX
X-BAPI-TIMESTAMP: 1744090967121
X-BAPI-RECV-WINDOW: 5000
Content-Type: application/json
Content-Length: 49

{
"symbol": null,
"cancelAll": true
}

Response Example

{
"retCode": 0,
"retMsg": "OK",
"result": {
"list": [
{
"orderId": "11ec47f3-f0a2-4b2a-b302-236f2a2d53a2",
"orderLinkId": ""
}
],
"success": "1"
},
"retExtInfo": {},
"time": 1744090940933
}