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

# Cancel Orders

> This endpoint cancels orders by market or across all markets.



## OpenAPI

````yaml DELETE /api/v1/orders
openapi: 3.1.0
info:
  title: Order API
  version: 1.0.0
servers:
  - url: https://order.sandbox.rails.xyz
security: []
paths:
  /api/v1/orders:
    delete:
      summary: Cancel orders by market or across all markets
      operationId: cancelOrders
      parameters:
        - name: market
          in: query
          required: true
          description: >-
            Market name. Example value: `ETH-USDT`. To get all supported
            markets, call
            [/api/v1/markets](/latest/perps/rest-api/get-supported-markets)
            endpoint. To cancel orders across all markets, use the value `all`.
          schema:
            type: string
        - name: clientRequestId
          in: query
          required: false
          description: >-
            Client-generated UUID for correlation. Example value:
            `0835bf3e-4a20-41f0-908d-8213f2b7a285`. If not provided, a random
            UUID will be generated.
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: >-
                      A message describing the result of the cancel orders
                      operation.
                required:
                  - message
              example:
                message: Cancelling 1 order for market ETH-USDT without any errors
        '401':
          $ref: '#/components/responses/Unauthorized'
      security:
        - bearerAuth: []
components:
  responses:
    Unauthorized:
      description: ''
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: A human-readable message describing the error.
            required:
              - message
          example:
            message: Unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````