Skip to main content

Cancel All Spread 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 canceled regardless of the cancelAll field.
  • When symbol is not specified and cancelAll=true, all orders, regardless of the symbol, will be canceled
  • cancelAllfalsebooleantrue, false
    info

    The ack of cancel-all order request indicates that the request is successfully accepted. Please use websocket order stream 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
    }