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

# Batch Cancel

> Cancel multiple orders in a single request

<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">batch\_cancel</span>
</div>

The `batch_cancel` request enables multiple orders to be cancelled in a single request by a range of identifiers (minimum of 2 and maximum 50 in each batch).

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

    <ResponseField name="params" type="object">
      <Expandable title="properties" defaultOpen>
        <ResponseField name="orders" type="string[]" required>
          A list containing either client `order_userref` or Kraken `order_id` identifiers.
        </ResponseField>

        <ResponseField name="cl_ord_id" type="string[]">
          A list of client `cl_ord_id` identifiers.
        </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">
    <ResponseField name="method" type="string">
      Value: `batch_cancel`
    </ResponseField>

    <ResponseField name="result" type="object">
      <span className="field-attr">Condition:</span> if `success` is `true`

      <Expandable title="properties" defaultOpen>
        <ResponseField name="count" type="integer">
          Number of orders cancelled.
        </ResponseField>

        <ResponseField name="warnings" type="array of string">
          Non-fatal warnings, 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": "batch_cancel",
        "params": {
            "orders": [
                "1",
                "2",
                "ORDERX-IDXXX-XXXXX3"
            ],
            "token": "TxxxxxxxxxOxxxxxxxxxxKxxxxxxxExxxxxxxxN"
        },
        "req_id": 1234567890
    }
    ```

    ```json Response theme={null}
    {
        "method": "batch_cancel",
        "req_id": 1234567890,
        "result": {
            "count": 3
        },
        "success": true,
        "time_in": "2022-06-13T08:09:10.123456Z",
        "time_out": "2022-06-13T08:09:10.7890123"
    }
    ```
  </CodeGroup>
</Panel>
