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

# Cancel all orders

> Cancels every resting order you hold in the current auction cycle. No request body is required. Returns 200 with an empty `orderIds` array if you have no resting orders. Blocked during the lock window (error 136001).



## OpenAPI

````yaml openapi/match.yaml post /v1/match/orders/cancel-all
openapi: 3.1.0
info:
  title: Circle Match API
  description: >
    The Circle Match API provides endpoints for Circle Match, a periodic

    batch-auction venue that coordinates USDC burn demand with USDC mint demand

    for eligible Circle Mint customers.


    ## Authentication


    All REST endpoints require a Bearer token:


    ```

    Authorization: Bearer <API_KEY>

    ```


    ## WebSocket


    Real-time auction state and account events are delivered over a persistent

    WebSocket connection at `wss://api.circle.com/v1/match/ws` (production) or

    `wss://api-sandbox.circle.com/v1/match/ws` (sandbox).


    Obtain a short-lived ticket with `POST /v1/match/ws/ticket`, then pass two

    `Sec-WebSocket-Protocol` values in the upgrade request:


    - `circle-match.v1`

    - `ticket.<jwt>` — the ticket value, prefixed with `ticket.`


    After connection, subscribe to the `market` channel for public auction state

    or the `account` channel for private order and fill events. See the Circle

    Match WebSocket reference for the full protocol specification.


    ## Error codes


    | Code   | HTTP | Description |

    |--------|------|-------------|

    | 136001 | 400  | Auction locked — cancellations and less-competitive fee
    changes not accepted |

    | 136002 | 400  | Auction settling — try again after settlement completes |

    | 137001 | 400  | Insufficient available balance |

    | 137002 | 400  | Invalid wallet |

    | 137003 | 400  | Wallet not found |

    | 137004 | 409  | Idempotency key reused with different parameters |

    | 137005 | 400  | Fee change not more competitive during lock window |

    | 137006 | 409  | Self-match violation — open order on opposite side of same
    auction |

    | 137007 | 400  | Invalid fiat account |

    | 137008 | 400  | Maximum orders per auction reached |

    | 137009 | 400  | Transaction limit exceeded |

    | 137010 | 400  | Entity not eligible for Circle Match |

    | 138001 | 400  | Withdrawal amount exceeds available balance |

    | 138002 | 400  | Withdrawal request invalid |

    | 138003 | 404  | No Circle Match account found for this entity |

    | 138004 | 400  | Invalid withdrawal destination |

    | 139001 | 400  | Circle Match wallet invalid |
  version: 1.0.0
servers:
  - url: https://api.circle.com
    description: Production
  - url: https://api-sandbox.circle.com
    description: Sandbox
security:
  - BearerAuth: []
tags:
  - name: Account
    description: Account balance and activity summary
  - name: Orders
    description: Place, list, retrieve, cancel, and modify orders
  - name: Withdrawals
    description: Withdraw restricted mint-side USDC
  - name: WebSocket
    description: Obtain a WebSocket connection ticket
paths:
  /v1/match/orders/cancel-all:
    post:
      tags:
        - Orders
      summary: Cancel all orders
      description: >-
        Cancels every resting order you hold in the current auction cycle. No
        request body is required. Returns 200 with an empty `orderIds` array if
        you have no resting orders. Blocked during the lock window (error
        136001).
      operationId: cancelAllOrders
      responses:
        '200':
          description: All orders cancelled
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - auctionId
                      - orderIds
                      - status
                    properties:
                      auctionId:
                        type: integer
                        example: 42
                      orderIds:
                        type: array
                        description: >-
                          UUIDs of all cancelled orders. Empty if no resting
                          orders existed.
                        items:
                          type: string
                          format: uuid
                        example:
                          - 550e8400-e29b-41d4-a716-446655440000
                          - 661f9511-f30c-52e5-b827-557766551111
                      status:
                        type: string
                        enum:
                          - cancelled
                        example: cancelled
        '400':
          description: >-
            Bad request. Error codes: `136001` — auction is locked,
            cancellations not accepted; `136002` — auction is settling, try
            again after settlement.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: integer
          description: Circle error code
          example: 137001
        message:
          type: string
          description: Human-readable error description
          example: Insufficient available balance
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````