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

# Cancel All Orders



## OpenAPI

````yaml DELETE /orders/all/{slug}
openapi: 3.0.0
info:
  title: Limitless Exchange API
  description: >-
    Production-ready REST API for prediction market trading, portfolio
    management, and market data on Limitless Exchange (Base L2).
  version: '1.0'
  contact:
    name: API Support
    url: https://limitless.exchange
    email: help@limitless.network
servers:
  - url: https://api.limitless.exchange
    description: Production API
security: []
tags:
  - name: Authentication
    description: User authentication and session management
  - name: Markets
    description: Browse, search, and analyze prediction markets
  - name: Market Navigation
    description: Navigation tree, market pages, and property filters
  - name: Trading
    description: Create, manage, and cancel orders
  - name: Portfolio
    description: Position tracking, trade history, and performance
  - name: API Tokens
    description: Scoped API token management for partner integrations
  - name: Partner Accounts
    description: Sub-account creation and allowance recovery for partner integrations
  - name: System
    description: Public API state and availability information
paths:
  /orders/all/{slug}:
    delete:
      tags:
        - Trading
      summary: Cancel all of a user's orders in a specific market
      operationId: OrderController_cancelAllOrders
      parameters: []
      responses:
        '200':
          description: All orders successfully cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAllOrdersResponseDto'
        '207':
          description: Partial success - some orders cancelled, some failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelAllOrdersResponseDto'
        '400':
          description: Invalid market slug or no orders could be cancelled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '401':
          description: User not authenticated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponseDto'
        '500':
          description: Server error during cancellation
        '503':
          description: >-
            Cancellation is temporarily unavailable because trading is disabled
            by maintenance mode
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: trading_disabled
                  message:
                    type: string
                    example: Trading is currently disabled.
                  mode:
                    type: string
                    enum:
                      - disabled
                    example: disabled
                  resumeAt:
                    type: string
                    format: date-time
                    nullable: true
                    example: '2026-06-22T18:00:00.000Z'
                required:
                  - code
                  - message
                  - mode
              example:
                code: trading_disabled
                message: Trading is currently disabled.
                mode: disabled
                resumeAt: '2026-06-22T18:00:00.000Z'
      security:
        - HmacAuth: []
components:
  schemas:
    CancelAllOrdersResponseDto:
      type: object
      properties:
        message:
          type: string
          description: Confirmation message for cancelling all orders
          example: Orders canceled successfully
        canceled:
          description: Array of successfully cancelled order IDs
          example:
            - 611badac-8dfc-48a0-b09e-59654adea1c5
          type: array
          items:
            type: string
        failed:
          description: Array of orders that failed to cancel with reasons
          type: array
          items:
            $ref: '#/components/schemas/CancelOrderFailure'
      required:
        - message
    ErrorResponseDto:
      type: object
      properties:
        message:
          type: string
          description: Error message
          example: Invalid order data
      required:
        - message
    CancelOrderFailure:
      type: object
      properties:
        orderId:
          type: string
          description: Order ID that failed to cancel
          example: b53f0e4b-1529-45cc-ad39-e27f4c6eab5a
        reason:
          type: string
          description: Error code indicating the reason for failure
          example: ORDER_NOT_FOUND
          enum:
            - ORDER_NOT_FOUND
            - UNKNOWN_ERROR
        message:
          type: string
          description: User-friendly error message
          example: Order not found or already canceled
      required:
        - orderId
        - reason
        - message
  securitySchemes:
    HmacAuth:
      type: apiKey
      in: header
      name: lmts-api-key
      description: >-
        Scoped API token with HMAC-SHA256 signing. Requires three headers:
        lmts-api-key (token ID), lmts-timestamp (ISO-8601), lmts-signature
        (Base64-encoded HMAC). See Authentication docs for details.

````