Skip to main content

private/cancel-all-orders

REQUEST 

wss://stream.crypto.com/exchange/v1/user

private/cancel-all-ordersPrivate
Cancels all orders for a particular instrument/pair (asynchronous).

This call is asynchronous, so the response is simply a confirmation of the request.

The user.order subscription can be used to check when the order is successfully canceled.

Request

Body

required
    id int64required

    Request id (echoed in response)

    method stringrequired

    Must be "private/cancel-all-orders"

    nonce int64required

    Current timestamp in milliseconds, e.g. "1771761038000".

    params objectrequired
    instrument_name string

    e.g. BTCUSD-PERP. If not provided, the orders of ALL instruments will be canceled.

    type WsCancelOrderType (string)

    Possible values: [LIMIT, TRIGGER, ALL]

    Allowed values depend on operation:

    • private/cancel-all-orders: LIMIT, ALL
    • private/advanced/cancel-all-orders: LIMIT, TRIGGER, ALL. For LIMIT, only the legs from advanced orders will be in-scope.
WebSocket response
Schema
    id int64

    Echoed request id

    method string

    Method invoked

    code int32

    0 = success; non-zero indicates error (reason code).

    result object
    Present when code === 0; no result block per docs (code 0 = queued).
    object
    message string

    Present when code !== 0.

    original string

    Present when code !== 0.