> ## 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.

# Place an order

> Submits a BURN or MINT order to the current auction cycle. Returns 202 Accepted with the orderId and initial `pending` status. The order rests until the auction clears.
The `idempotencyKey` you supply becomes the `orderId` for all subsequent lookups. Use a unique UUID v4 per order. Reusing a key with different parameters returns error 137004 (HTTP 409).
BURN orders require `sourceWalletId` and `fiatAccountId`. MINT orders must omit those fields. Use the `orderType` discriminator to select the correct variant.



## OpenAPI

````yaml openapi/match.yaml post /v1/match/orders
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:
    post:
      tags:
        - Orders
      summary: Place an order
      description: >-
        Submits a BURN or MINT order to the current auction cycle. Returns 202
        Accepted with the orderId and initial `pending` status. The order rests
        until the auction clears.

        The `idempotencyKey` you supply becomes the `orderId` for all subsequent
        lookups. Use a unique UUID v4 per order. Reusing a key with different
        parameters returns error 137004 (HTTP 409).

        BURN orders require `sourceWalletId` and `fiatAccountId`. MINT orders
        must omit those fields. Use the `orderType` discriminator to select the
        correct variant.
      operationId: placeOrder
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlaceOrderRequest'
            examples:
              burn_limit:
                summary: BURN limit order
                value:
                  idempotencyKey: 550e8400-e29b-41d4-a716-446655440000
                  orderType: BURN
                  amount:
                    amount: '500.00'
                    currency: USD
                  feeBps: '5'
                  postFillAction: roll
                  sourceWalletId: '1000001234'
                  fiatAccountId: 550e8400-e29b-41d4-a716-446655440001
              mint_limit:
                summary: MINT limit order
                value:
                  idempotencyKey: 661f9511-f30c-52e5-b827-557766551111
                  orderType: MINT
                  amount:
                    amount: '1000.00'
                    currency: USD
                  feeBps: '5'
                  postFillAction: roll
              burn_market:
                summary: BURN market order (no fee ceiling)
                value:
                  idempotencyKey: 772a0622-a41d-63f6-c938-668877662222
                  orderType: BURN
                  amount:
                    amount: '500.00'
                    currency: USD
                  postFillAction: cancel
                  sourceWalletId: '1000001234'
                  fiatAccountId: 550e8400-e29b-41d4-a716-446655440001
      responses:
        '202':
          description: Order accepted and resting in the current auction
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    type: object
                    required:
                      - auctionId
                      - orderId
                      - status
                    properties:
                      auctionId:
                        type: integer
                        description: Auction cycle the order entered
                        example: 42
                      orderId:
                        type: string
                        format: uuid
                        description: >-
                          Order identifier; equals the idempotencyKey you
                          supplied
                        example: 550e8400-e29b-41d4-a716-446655440000
                      status:
                        type: string
                        enum:
                          - pending
                        example: pending
        '400':
          description: >-
            Bad request. Error codes: `137001` — insufficient available balance;
            `137002` — invalid wallet; `137003` — wallet not found; `137007` —
            invalid fiat account; `137008` — maximum orders per auction reached,
            wait for the next cycle; `137009` — transaction limit exceeded;
            `137010` — entity not eligible for Circle Match.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            Conflict. Error codes: `137004` — idempotency key reused with
            different parameters; `137006` — self-match violation, you already
            have an open order on the opposite side.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    PlaceOrderRequest:
      description: >-
        Request body for placing a Circle Match order. Use `orderType` to select
        the variant: BURN orders require `sourceWalletId` and `fiatAccountId`;
        MINT orders omit those fields.
      oneOf:
        - $ref: '#/components/schemas/PlaceBurnOrderRequest'
        - $ref: '#/components/schemas/PlaceMintOrderRequest'
      discriminator:
        propertyName: orderType
        mapping:
          BURN:
            $ref: '#/components/schemas/PlaceBurnOrderRequest'
          MINT:
            $ref: '#/components/schemas/PlaceMintOrderRequest'
    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
    PlaceBurnOrderRequest:
      description: Request body for placing a BURN order
      allOf:
        - $ref: '#/components/schemas/PlaceOrderBase'
        - type: object
          required:
            - sourceWalletId
            - fiatAccountId
          properties:
            orderType:
              type: string
              enum:
                - BURN
            sourceWalletId:
              type: string
              description: Circle Mint wallet ID that funds the burn
              example: '1000001234'
            fiatAccountId:
              type: string
              format: uuid
              description: Fiat account that receives settlement proceeds
              example: 550e8400-e29b-41d4-a716-446655440001
    PlaceMintOrderRequest:
      description: Request body for placing a MINT order
      allOf:
        - $ref: '#/components/schemas/PlaceOrderBase'
        - type: object
          properties:
            orderType:
              type: string
              enum:
                - MINT
    PlaceOrderBase:
      type: object
      required:
        - idempotencyKey
        - orderType
        - amount
        - postFillAction
      properties:
        idempotencyKey:
          type: string
          format: uuid
          description: >-
            Unique UUID v4 per order. Becomes the orderId for all subsequent
            lookups. Reusing a key with different parameters returns error
            137004.
          example: 550e8400-e29b-41d4-a716-446655440000
        orderType:
          $ref: '#/components/schemas/OrderType'
        amount:
          allOf:
            - $ref: '#/components/schemas/Money'
          description: Amount to burn or mint. Minimum $100, must be a multiple of $100.
        feeBps:
          oneOf:
            - type: string
            - type: 'null'
          description: >-
            For BURN orders: maximum fee in basis points you are willing to pay.
            For MINT orders: minimum rebate in basis points you require. Omit or
            set to null for a market order that matches at any clearing fee.
          example: '5'
        postFillAction:
          $ref: '#/components/schemas/PostFillAction'
    OrderType:
      type: string
      description: Whether this is a BURN (USDC-to-USD) or MINT (USD-to-USDC) order
      enum:
        - BURN
        - MINT
    Money:
      type: object
      description: A monetary amount with its currency
      required:
        - amount
        - currency
      properties:
        amount:
          type: string
          description: Decimal amount as a string, rounded to 2 decimal places
          example: '500.00'
        currency:
          type: string
          description: ISO 4217 currency code
          example: USD
    PostFillAction:
      type: string
      description: |
        Action to take on unfilled remainder after an auction cycle closes.
        - `roll`: Carry remainder into the next auction as a new linked order.
        - `fallback`: Route remainder to standard Circle Mint.
        - `cancel`: Drop the unfilled remainder.
      enum:
        - roll
        - fallback
        - cancel
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````