> ## 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

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

The `cancelOrder` 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.

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

    <ResponseField name="txid" type="array of string" required>
      A list containing either client `order_userref` or Kraken `order_id` identifiers.
    </ResponseField>

    <ResponseField name="cl_ord_id" type="array of string">
      A list of client `cl_ord_id` identifiers.
    </ResponseField>

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

    <ResponseField name="token" type="string" required>
      Session token from the [GetWebSocketsToken](/api-reference/trading/get-websockets-token) REST endpoint.
    </ResponseField>
  </Tab>

  <Tab title="Response">
    <ResponseField name="event" type="string">
      Value: `cancelOrderStatus`
    </ResponseField>

    <ResponseField name="status" type="string">
      <span className="field-attr">One of:</span> `ok`, `error`
    </ResponseField>

    <ResponseField name="reqid" type="integer">
      Client originated identifier for the request that initiated this response.
    </ResponseField>

    <ResponseField name="errorMessage" type="string">
      Error message for unsuccessful requests.
    </ResponseField>
  </Tab>
</Tabs>

<Panel>
  <CodeGroup>
    ```json Request theme={null}
    {
        "event": "cancelOrder",
        "token": "0000000000000000000000000000000000000000",
        "txid": [
            "OGTT3Y-C6I3P-XRI6HX",
            "OGTT3Y-C6I3P-X2I6HX"
        ]
    }
    ```

    ```json Response theme={null}
    {
        "event": "cancelOrderStatus",
        "status": "ok"
    }
    ```

    ```json Error theme={null}
    {
        "errorMessage": "EOrder:Unknown order",
        "event": "cancelOrderStatus",
        "status": "error"
    }
    ```
  </CodeGroup>
</Panel>
