> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kraken.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Order

> Cancel one or more open orders via WebSocket

<div className="api-banner">
  <span className="api-protocol ws">WSS</span>
  <span className="api-detail">ws-auth.kraken.com/v2</span>
  <span className="api-tag">cancel\_order</span>
</div>

The `cancel_order` request cancels one or more open orders in a single request. The orders to be cancelled can be identified by a range of client or Kraken identifiers. Note, the details of the individual cancelled orders will also be streamed on the `executions` channel.

<Tabs>
  <Tab title="Request">
    <ResponseField name="method" type="string" required>
      Value: `cancel_order`
    </ResponseField>

    <ResponseField name="params" type="object" required>
      <Expandable title="properties" defaultOpen>
        <ResponseField name="order_id" type="array of string">
          A list of Kraken `order_id` identifiers. Cannot be combined with `cl_ord_id` or `order_userref` in the same request.
        </ResponseField>

        <ResponseField name="cl_ord_id" type="array of string">
          A list of client `cl_ord_id` identifiers. Cannot be combined with `order_id` or `order_userref` in the same request.
        </ResponseField>

        <ResponseField name="order_userref" type="array of integer">
          A list of client `order_userref` identifiers. Cannot be combined with `order_id` or `cl_ord_id` in the same request.
        </ResponseField>

        <ResponseField name="token" type="string" required>
          Authentication token. See [authentication guide](/exchange/guides/websockets/authentication) for details.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="req_id" type="integer">
      Optional client originated request identifier sent as acknowledgment in the response.
    </ResponseField>
  </Tab>

  <Tab title="Response">
    When cancelling multiple orders, there will be a stream of individual order responses.

    <ResponseField name="method" type="string">
      Value: `cancel_order`
    </ResponseField>

    <ResponseField name="result" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="order_id" type="string">
          Kraken identifier of the cancelled order.
        </ResponseField>

        <ResponseField name="cl_ord_id" type="string">
          Optional client identifier of the cancelled order.
        </ResponseField>

        <ResponseField name="warnings" type="array of string">
          Non-fatal warnings about the cancellation, if any.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="error" type="string">
      Error message. Condition: if `success` is `false`.
    </ResponseField>

    <ResponseField name="success" type="boolean">
      Indicates if the request was successfully processed by the engine. One of: `true`, `false`
    </ResponseField>

    <ResponseField name="req_id" type="integer">
      Optional client originated request identifier sent as acknowledgment in the response.
    </ResponseField>

    <ResponseField name="time_in" type="string">
      The timestamp when the request was received on the wire, just prior to parsing data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>

    <ResponseField name="time_out" type="string">
      The timestamp when the response was sent on the wire, just prior to transmitting data. Format: RFC3339. Example: `2022-12-25T09:30:59.123456Z`
    </ResponseField>
  </Tab>
</Tabs>

<Panel>
  <CodeGroup>
    ```json Request theme={null}
    {
        "method": "cancel_order",
        "params": {
            "order_id": [
                "OM5CRX-N2HAL-GFGWE9",
                "OLUMT4-UTEGU-ZYM7E9"
            ],
            "token": "zGXT1dUQQjJjy5VmGXMegdDQngXXehNo5qbMBVolwEQ"
        },
        "req_id": 123456789
    }
    ```

    ```json Response theme={null}
    {
        "method": "cancel_order",
        "req_id": 123456789,
        "result": {
            "order_id": "OLUMT4-UTEGU-ZYM7E9"
        },
        "success": true,
        "time_in": "2023-09-21T14:36:57.428972Z",
        "time_out": "2023-09-21T14:36:57.437952Z"
    }
    ```
  </CodeGroup>
</Panel>
