> ## 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 an order

> Cancels a single resting order. Cancellations are blocked during the lock window (error 136001) and while the previous auction is settling (error 136002). If the order has already cleared, it cannot be cancelled.



## OpenAPI

````yaml openapi/match.yaml post /v1/match/orders/cancel
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:
    post:
      tags:
        - Orders
      summary: Cancel an order
      description: >-
        Cancels a single resting order. Cancellations are blocked during the
        lock window (error 136001) and while the previous auction is settling
        (error 136002). If the order has already cleared, it cannot be
        cancelled.
      operationId: cancelOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CancelOrderRequest'
            example:
              auctionId: 42
              orderId: 550e8400-e29b-41d4-a716-446655440000
      responses:
        '200':
          description: Order cancelled
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - auctionId
                      - orderId
                      - status
                    properties:
                      auctionId:
                        type: integer
                        example: 42
                      orderId:
                        type: string
                        format: uuid
                        example: 550e8400-e29b-41d4-a716-446655440000
                      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:
    CancelOrderRequest:
      type: object
      required:
        - auctionId
        - orderId
      properties:
        auctionId:
          type: integer
          description: Auction cycle that contains the order to cancel
          example: 42
        orderId:
          type: string
          format: uuid
          description: UUID of the order to cancel
          example: 550e8400-e29b-41d4-a716-446655440000
    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

````