> ## Documentation Index
> Fetch the complete documentation index at: https://whitebit-mintlify-fix-broken-links-1774829655.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel all orders

> Cancels all orders that meet the conditions [order](/glossary#orders).

<Warning>
Rate limit: 10000 requests/10 sec.
</Warning>

<Accordion title="Error Codes">
- `30` - default validation error code
- `31` - market validation failed
</Accordion>

<Accordion title="Errors">
```json
{
  "code": 31,
  "message": "Validation failed",
  "errors": {
    "market": ["Market is not available."]
  }
}
```

```json
{
  "code": 30,
  "message": "Validation failed",
  "errors": {
    "type": ["The type must be an array."]
  }
}
```

```json
{
  "code": 30,
  "message": "Validation failed",
  "errors": {
    "market": [
      "Market field should be a string.",
      "Market field format is invalid."
    ]
  }
}
```
</Accordion>




## OpenAPI

````yaml /openapi/private/http-trade-v4.yaml POST /api/v4/order/cancel/all
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: []
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/all:
    post:
      tags:
        - Spot Trading
      summary: Cancel all orders
      description: |
        Cancels all orders that meet the conditions [order](/glossary#orders).

        <Warning>
        Rate limit: 10000 requests/10 sec.
        </Warning>

        <Accordion title="Error Codes">
        - `30` - default validation error code
        - `31` - market validation failed
        </Accordion>

        <Accordion title="Errors">
        ```json
        {
          "code": 31,
          "message": "Validation failed",
          "errors": {
            "market": ["Market is not available."]
          }
        }
        ```

        ```json
        {
          "code": 30,
          "message": "Validation failed",
          "errors": {
            "type": ["The type must be an array."]
          }
        }
        ```

        ```json
        {
          "code": 30,
          "message": "Validation failed",
          "errors": {
            "market": [
              "Market field should be a string.",
              "Market field format is invalid."
            ]
          }
        }
        ```
        </Accordion>
      operationId: cancelAllOrders
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                market:
                  type: string
                  description: 'Available [market](/glossary#market). Example: BTC_USDT'
                  example: BTC_USDT
                type:
                  type: array
                  description: 'Order types value. Example: ''spot'', ''margin'', ''futures'''
                  example:
                    - spot
                    - margin
                    - futures
                  items:
                    type: string
                    enum:
                      - spot
                      - margin
                      - futures
                request:
                  type: string
                  example: '{{request}}'
                nonce:
                  type: string
                  example: '{{nonce}}'
            example:
              market: BTC_USDT
              type:
                - spot
                - margin
                - futures
      responses:
        '200':
          description: Orders cancelled successfully
        '400':
          description: Inner validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Service temporarily unavailable
      security:
        - ApiKeyAuth: []
components:
  schemas:
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-TXC-APIKEY
      description: |
        API Key authentication for private endpoints.

        Required headers:
        - X-TXC-APIKEY: API key
        - X-TXC-PAYLOAD: Base64 encoded JSON payload
        - X-TXC-SIGNATURE: HMAC SHA512 signature

````