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

# Cancel bulk orders

> Cancel up to 100 spot orders in a single request via the WhiteBIT V4 API.

* [Cancel order](/api-reference/spot-trading/cancel-order) — cancel a single order by ID
* [Cancel all orders](/api-reference/spot-trading/cancel-all-orders) — cancel every open order in a market
* [Bulk limit order](/api-reference/spot-trading/bulk-limit-order) — sibling bulk endpoint for order creation
* [Query unexecuted orders](/api-reference/spot-trading/query-unexecuted-orders) — list open orders to cancel


## OpenAPI

````yaml /openapi/private/http-trade-v4.yaml POST /api/v4/order/cancel/bulk
openapi: 3.0.3
info:
  title: Private HTTP API V4 - Collateral Trading
  description: |
    WhiteBIT Private HTTP API V4 for collateral/margin trading operations.

    Base URL: https://whitebit.com

    All endpoints return time in Unix-time format.
    All endpoints return either a JSON object or array.
    For receiving responses from API calls please use http method POST.

    Authentication required for all endpoints.
  version: 4.0.0
  license:
    name: WhiteBIT Terms of Service
    url: https://whitebit.com/terms
servers:
  - url: https://whitebit.com
    description: WhiteBIT Global Server
  - url: https://whitebit.eu
    description: WhiteBIT EU Server
security:
  - ApiKeyAuth: []
    PayloadAuth: []
    SignatureAuth: []
tags:
  - name: Collateral Trading
    description: Endpoints for collateral/margin trading operations
  - name: Spot Trading
    description: Endpoints for spot trading operations
  - name: Market Fee
    description: Endpoints for querying trading fees
paths:
  /api/v4/order/cancel/bulk:
    post:
      tags:
        - Spot Trading
      summary: Cancel bulk orders
      description: >
        The endpoint cancels up to 100 [orders](/glossary#orders) in a single
        request. Each item identifies a target order by `market` plus exactly
        one of `orderId` or `clientOrderId`. The response is an array whose
        items match the input order one-to-one — `response[i]` corresponds to
        `request.orders[i]`.


        <Warning>

        Rate limit: 10000 requests/10 sec.

        </Warning>


        <Warning>

        Limit: From 1 to 100 orders per request.

        </Warning>


        <Note>

        - Provide exactly one of `orderId` or `clientOrderId` per item. Sending
        both, or neither, returns a per-item validation error.

        - The endpoint always processes every item independently. There is no
        `stopOnFail`-style switch.

        - When the caller is not authenticated, the API returns the standard
        authorization error and skips per-item validation.

        </Note>


        <Accordion title="Error Codes">

        - `30` — validation failure (per-item)

        - `404` — order not found (per-item)

        - `500` — trade service unavailable (per-item)

        </Accordion>


        <Accordion title="Errors">

        **Per-item errors (returned inside the response array):**


        Element is not a valid object:

        ```json

        {
          "result": null,
          "error": {
            "code": 30,
            "message": "Validation failed",
            "errors": { "request": ["Invalid order format"] }
          }
        }

        ```


        `market` field is missing:

        ```json

        {
          "result": null,
          "error": {
            "code": 30,
            "message": "Validation failed",
            "errors": { "market": ["validation.required"] }
          }
        }

        ```


        Specified market does not exist:

        ```json

        {
          "result": null,
          "error": {
            "code": 30,
            "message": "Validation failed",
            "errors": { "market": ["validation.market_not_exist"] }
          }
        }

        ```


        Neither `orderId` nor `clientOrderId` provided:

        ```json

        {
          "result": null,
          "error": {
            "code": 30,
            "message": "Validation failed",
            "errors": { "request": ["validation.required"] }
          }
        }

        ```


        Both `orderId` and `clientOrderId` provided:

        ```json

        {
          "result": null,
          "error": {
            "code": 30,
            "message": "Validation failed",
            "errors": { "request": ["api.validation.order.chooseOneId"] }
          }
        }

        ```


        Order not found (returned for both `orderId` and `clientOrderId`
        lookups):

        ```json

        {
          "result": null,
          "error": {
            "code": 404,
            "message": "Order not found",
            "errors": {
              "orderId": ["Order does not exist or already cancelled"]
            }
          }
        }

        ```


        Trade service unavailable (returned when the trade service is
        unreachable or returns an unparseable response):

        ```json

        {
          "result": null,
          "error": {
            "code": 500,
            "message": "Service temporary unavailable",
            "errors": { "error": ["Service temporary unavailable"] }
          }
        }

        ```


        **Request-level errors (HTTP 422, returned as a standard error envelope,
        not as an array):**


        `orders` field is missing or is not an array:

        ```json

        {
          "code": 30,
          "message": "Validation failed",
          "errors": { "orders": ["validation.required"] }
        }

        ```


        `orders` contains more than 100 elements:

        ```json

        {
          "code": 30,
          "message": "Validation failed",
          "errors": { "orders": ["validation.between"] }
        }

        ```

        </Accordion>
      operationId: cancelBulkOrders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - orders
                - request
                - nonce
              properties:
                orders:
                  type: array
                  minItems: 1
                  maxItems: 100
                  description: Array of orders to cancel. From 1 to 100 items per request.
                  items:
                    $ref: '#/components/schemas/BulkCancelOrderItem'
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: integer
                  example: 1594297865000
            example:
              orders:
                - market: BTC_USDT
                  orderId: 4326248250
                - market: ETH_USDT
                  clientOrderId: my-client-id
              request: '{{request}}'
              nonce: 1594297865000
      responses:
        '200':
          description: >-
            Bulk cancel result. The response is an array — `response[i]`
            corresponds to `request.orders[i]`. Each item contains either a
            `result` (cancellation succeeded) or an `error` (cancellation failed
            for that item). Partial failures within the array are normal; the
            request itself returns HTTP 200.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkCancelOrderResponse'
        '400':
          description: Inner validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
          PayloadAuth: []
          SignatureAuth: []
components:
  schemas:
    BulkCancelOrderItem:
      type: object
      description: >-
        A single cancel target. Provide `market` and exactly one of `orderId` or
        `clientOrderId`. Sending both, or neither, returns a per-item validation
        error.
      required:
        - market
      properties:
        market:
          type: string
          description: 'Available [market](/glossary#market). Example: `BTC_USDT`.'
          example: BTC_USDT
        orderId:
          type: integer
          description: >-
            System-assigned order ID. Required if `clientOrderId` is not set;
            mutually exclusive with `clientOrderId`.
          example: 4326248250
        clientOrderId:
          type: string
          description: >-
            Client-defined order ID supplied at order creation. Required if
            `orderId` is not set; mutually exclusive with `orderId`.
          example: my-client-id
    BulkCancelOrderResponse:
      type: array
      description: >-
        Per-item cancel results. `response[i]` corresponds to
        `request.orders[i]`. Each item contains either `result` (cancellation
        succeeded) or `error` (cancellation failed for that item) — never both.
      items:
        type: object
        properties:
          result:
            type: object
            allOf:
              - $ref: '#/components/schemas/BulkCancelOrderResult'
            nullable: true
          error:
            type: object
            allOf:
              - $ref: '#/components/schemas/ErrorResponse'
            nullable: true
    ErrorResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code
          example: 30
        message:
          type: string
          description: Error message
          example: Validation failed
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
          description: Detailed error information
    BulkCancelOrderResult:
      type: object
      description: >-
        Acknowledgement that a single item was cancelled. The endpoint echoes
        the identifiers from the request item; full order state is not returned.
        Use the single Cancel order endpoint when post-cancel order state is
        required.
      properties:
        orderId:
          type: integer
          description: System-assigned order ID of the cancelled order.
          example: 4326248250
        clientOrderId:
          type: string
          description: >-
            Client-defined order ID of the cancelled order, if one was set at
            order creation.
          example: my-client-id
        market:
          type: string
          description: >-
            Trading pair of the cancelled order. Format: `BASE_QUOTE` (e.g.
            `BTC_USDT`).
          example: BTC_USDT
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: The public WhiteBIT API key.
    PayloadAuth:
      type: apiKey
      in: header
      name: X-TXC-PAYLOAD
      description: Base64-encoded JSON request body.
    SignatureAuth:
      type: apiKey
      in: header
      name: X-TXC-SIGNATURE
      description: >-
        HMAC-SHA512 signature of the payload, hex-encoded. Computed as
        hex(HMAC-SHA512(payload, api_secret)).

````