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

> ## Agent Instructions
> Before reading these docs, install the relevant Circle Skill to get pre-loaded context — skills are LLM-optimized and cover architecture decisions, correct flows, and common pitfalls. In Claude Code: run /plugin marketplace add circlefin/skills then /plugin install circle-skills@circle. With Vercel Skills CLI: run npx skills add circlefin/skills. Available skills: use-usdc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-usdc/SKILL.md (balances, transfers, approvals on EVM and Solana); EURC has no skill — see https://developers.circle.com/stablecoins/what-is-eurc.md; bridge-stablecoin https://github.com/circlefin/skills/blob/master/plugins/circle/skills/bridge-stablecoin/SKILL.md (crosschain transfers via CCTP, USDC, EURC, and third-party assets); use-arc https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-arc/SKILL.md (Arc chain config, contract deployment, USDC bridging — Arc docs: https://docs.arc.io/llms.txt); use-circle-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-circle-wallets/SKILL.md (choose wallet type); use-developer-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-developer-controlled-wallets/SKILL.md (custodial wallets for payouts and treasury); use-user-controlled-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-user-controlled-wallets/SKILL.md (embedded wallets with Web2 login); use-modular-wallets https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-modular-wallets/SKILL.md (smart contract wallets with passkeys and ERC-4337); use-gateway https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-gateway/SKILL.md (unified USDC balance, nanopayments); use-smart-contract-platform https://github.com/circlefin/skills/blob/master/plugins/circle/skills/use-smart-contract-platform/SKILL.md (deploy, interact, monitor contracts). Pair any skill with the Circle MCP server for live SDK signatures, contract addresses, and chain IDs: {"mcpServers":{"circle":{"url":"https://api.circle.com/v1/codegen/mcp"}}}.
> Read the product overview first. Each product has an overview explaining when and why to use it. Read it before quickstarts.
> Pick the right wallet type. Developer-controlled (you hold keys), user-controlled (end user holds keys via PIN/social login), or modular (smart contract wallets with passkeys). See https://developers.circle.com/wallets.md.
> Use CCTP V2 for crosschain transfers. CCTP natively transfers USDC and EURC via burn-and-mint, and supports permissionless wrapping of third-party assets via lock-and-mint. V1 is legacy; always use V2 unless V1 is specified or the chain requires it (Noble, Sui, and Aptos still require V1). Migration guide: https://developers.circle.com/cctp/migration-from-v1-to-v2.md.
> Use Bridge Kit for frontend bridging. Wraps CCTP with a simpler SDK for user-facing apps. Use CCTP directly for backend transfers.
> Gas Station vs Paymaster. Gas Station sponsors gas for Circle Wallet transactions. Paymaster lets users pay gas in USDC. Different use cases — read both overviews.
> Gateway Nanopayments for sub-cent payments. Gasless USDC micropayments down to $0.000001 via x402 and batched settlement. For pay-per-request APIs, AI agent payments, streaming.
> Look up USDC addresses per chain. Never hardcode — use https://developers.circle.com/stablecoins/usdc-contract-addresses.md.
> Prefer SDKs over raw API calls. Node.js and Python SDKs handle auth, retries, and errors.
> API key required. Bearer token in Authorization header. Testnet and mainnet use separate keys and may use different base URLs depending on the product.
> Set up webhooks when available. Most operations are async. Webhooks deliver transaction confirmations and state changes.
> When calling list endpoints, paginate using pageSize and pageAfter until no nextPageAfter cursor is returned—stopping at the first page silently misses records.
> Building an AI agent? Start with the Agent Stack—Circle CLI, agent wallets, and nanopayments built for autonomous use cases: https://developers.circle.com/agent-stack.md.

# How-to: Place and manage orders

> Place BURN and MINT orders, apply filters when listing, and trace rolled orders using lineage fields.

Match exposes three order endpoints: one to submit an order, one to list orders
with filters, and one to fetch a single order with full detail. This guide
covers all three, including BURN-specific and MINT-specific required fields,
market versus limit orders, filter options for listing, and how to read lineage
and fill data on individual orders. If you're new to Match, start with the
[quickstart](/circle-match/quickstarts/place-your-first-order) before continuing
here.

## Prerequisites

Before you begin, ensure that you've:

* Obtained a Circle API key with Match access
* Created a Circle Mint wallet with sufficient USDC balance and linked a fiat
  account to receive settlement proceeds (BURN orders only)
* Reviewed the [funding model](/circle-match/concepts/funding-model) and
  [auction mechanics](/circle-match/concepts/how-it-works)

## Steps

### Step 1. Place a `BURN` order

A BURN order converts USDC to fiat. It requires two fields that MINT orders
omit: `sourceWalletId` (the wallet that funds the burn) and `fiatAccountId` (the
bank account that receives the settlement proceeds).

The `idempotencyKey` you supply in the request body becomes the `orderId` for
all subsequent lookups. Use a unique UUID v4 for each new order. Reusing an
idempotency key with different parameters returns a 409 with error code 137004.

```bash theme={null}
curl -X POST https://api-sandbox.circle.com/v1/match/orders \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotencyKey": "550e8400-e29b-41d4-a716-446655440000",
    "orderType": "BURN",
    "amount": {
      "amount": "500.00",
      "currency": "USD"
    },
    "feeBps": "5",
    "postFillAction": "roll",
    "sourceWalletId": "$WALLET_ID",
    "fiatAccountId": "$FIAT_ACCOUNT_ID"
  }'
```

A successful request returns `202 Accepted`:

```json theme={null}
{
  "data": {
    "auctionId": 42,
    "orderId": "550e8400-e29b-41d4-a716-446655440000",
    "status": "pending"
  }
}
```

**Required fields for BURN orders:**

| Field | Required | Type | Notes |
| - | - | - | - |
| `idempotencyKey` | Yes | UUID string | Becomes the `orderId`. Must be unique per order. |
| `orderType` | Yes | string | `"BURN"` |
| `amount` | Yes | Money object | `{"amount": "500.00", "currency": "USD"}`. Minimum $100, must be a multiple of $100. |
| `postFillAction` | Yes | string | `"roll"`, `"fallback"`, or `"cancel"`. |
| `sourceWalletId` | Yes | string | Circle Mint wallet ID that funds the burn. |
| `fiatAccountId` | Yes | UUID string | Fiat account that receives settlement proceeds. |
| `feeBps` | No | string or null | Fee ceiling in basis points. Omit or set to `null` for a market order. See [Step 3](#step-3-place-a-market-order). |

### Step 2. Place a MINT order

A MINT order converts fiat to USDC. It uses the same endpoint and most of the
same fields, but you must omit `sourceWalletId` and `fiatAccountId`. Including
either field in a MINT order returns a validation error.

```bash theme={null}
curl -X POST https://api-sandbox.circle.com/v1/match/orders \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotencyKey": "661f9511-f30c-52e5-b827-557766551111",
    "orderType": "MINT",
    "amount": {
      "amount": "1000.00",
      "currency": "USD"
    },
    "feeBps": "5",
    "postFillAction": "roll"
  }'
```

**Required fields for MINT orders:**

| Field | Required | Type | Notes |
| - | - | - | - |
| `idempotencyKey` | Yes | UUID string | Becomes the `orderId`. Must be unique per order. |
| `orderType` | Yes | string | `"MINT"` |
| `amount` | Yes | Money object | `{"amount": "1000.00", "currency": "USD"}`. Minimum $100, must be a multiple of $100. |
| `postFillAction` | Yes | string | `"roll"`, `"fallback"`, or `"cancel"`. |
| `feeBps` | No | string or null | Minimum rebate in basis points. Omit or set to `null` for a market order. See [Step 3](#step-3-place-a-market-order). |

### Step 3. Place a market order

A market order matches at whatever clearing fee the auction produces, with no
fee ceiling. To place a market order, omit `feeBps` entirely, or explicitly set
it to `null`.

```bash theme={null}
curl -X POST https://api-sandbox.circle.com/v1/match/orders \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotencyKey": "772g0622-g41d-63f6-c938-668877662222",
    "orderType": "BURN",
    "amount": {
      "amount": "500.00",
      "currency": "USD"
    },
    "postFillAction": "cancel",
    "sourceWalletId": "$WALLET_ID",
    "fiatAccountId": "$FIAT_ACCOUNT_ID"
  }'
```

A limit order (with `feeBps` set) only matches when the clearing fee does not
exceed your limit. If the clearing fee is higher, the order ends the auction
cycle unfilled and follows your `postFillAction` election.

### Step 4. List orders with filters

Use `GET /v1/match/orders` to retrieve a paginated list of your orders. All
parameters are optional.

```bash theme={null}
curl -X GET "https://api-sandbox.circle.com/v1/match/orders?status=pending&orderType=BURN&pageSize=50" \
  -H "Authorization: Bearer $API_KEY"
```

**Available query parameters:**

| Parameter | Type | Notes |
| - | - | - |
| `page` | integer | Page number, 1-based. Defaults to 1. |
| `pageSize` | integer | Results per page. Default 20, maximum 100. |
| `status` | string | Filter by order status. An unknown value returns 400. |
| `orderType` | string | `BURN` or `MINT`. Any other value returns 400. |
| `orderId` | UUID string | Returns only the order matching this UUID. A malformed value returns 400. |
| `from` | date-time string | Created-at lower bound (inclusive). |
| `to` | date-time string | Created-at upper bound (inclusive). Passing `from` after `to` returns 400. |

The response includes a `pagination` object alongside the `orders` array:

```json theme={null}
{
  "data": {
    "orders": ["..."],
    "pagination": {
      "page": 1,
      "pageSize": 50,
      "total": 142
    }
  }
}
```

### Step 5. Get a single order and read lineage and fill

Use `GET /v1/match/orders/{id}` to fetch full detail for one order, including
its lineage and fill result.

```bash theme={null}
curl -X GET "https://api-sandbox.circle.com/v1/match/orders/$ORDER_ID" \
  -H "Authorization: Bearer $API_KEY"
```

**Reading lineage fields**

When an order rolls into a new auction cycle, Match creates a new order linked
to the original. The `lineage` object lets you trace the full chain:

* `lineage.parentOrderId`: the UUID of the order this one rolled from. `null` if
  this is the original order.
* `lineage.childOrderId`: the UUID of the order this one rolled into. `null` if
  the order hasn't rolled yet, or if it was cancelled.

To reconstruct the full history of a rolled order, start with any order in the
chain and follow `parentOrderId` backward or `childOrderId` forward until you
reach `null`.

**Reading the fill object**

The `fill` field is `null` until the order is matched. Once matched, it
contains:

```json theme={null}
{
  "fill": {
    "filledAmount": { "amount": "500.00", "currency": "USD" },
    "unfilledAmount": { "amount": "0.00", "currency": "USD" },
    "clearingFeeBps": "3",
    "matchedAt": "2026-08-17T00:05:00Z"
  }
}
```

A non-zero `unfilledAmount` indicates a partial fill. In that case, check
`lineage.childOrderId` to find the follow-on order that was created for the
unfilled portion according to your `postFillAction` election.

## Order status lifecycle

| Status | Description |
| - | - |
| `pending` | Accepted and queued for the current auction. Not yet matched or settled. |
| `settling` | Matched in the auction. Funds are moving between counterparties. |
| `filled` | The entire order matched and settlement is complete. |
| `partial_fill` | Only part of the order matched. The unfilled portion followed your `postFillAction` election. |
| `unfilled` | The auction closed with no fill for this order. The order followed your `postFillAction` election. |
| `cancelled` | You canceled the order before it matched. |
| `failed` | The order matched but the underlying funding never settled. No trade occurred. |

## Error reference

| Code | HTTP | Meaning |
| - | - | - |
| 137002 | 400 | One or more wallet IDs in the request are invalid. |
| 137003 | 400 | One or more wallet IDs were not found. |
| 137004 | 409 | Idempotency key reused with different parameters. |
| 137006 | 409 | Self-match violation: you already have an open order on the opposite side of this auction. |
| 137007 | 400 | The fiat account cannot be used for this burn order. |
| 137008 | 400 | Maximum orders per auction reached. Wait for the next auction cycle. |
| 137009 | 400 | Exceeds your transaction limit. |
| 137010 | 400 | This account is not eligible to place orders. |
