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

# Reserve settlement advance credit

> Holds credit so the maker can lock in a fee snapshot before requesting
the settlement advance. Reservations expire after a short window (~15
minutes); after expiry the maker must reserve again.

Replaying the same `idempotencyKey` returns the existing reservation.
Submitting a different `idempotencyKey` while another reservation for
the same currency is still active will be rejected — the maker must
cancel the active reservation first before creating a new one. There
is one active reservation allowed per currency.

A reservation is automatically cancelled after a single settlement advance
is made against it.

Calling `/reserve` is optional; the maker may skip it and go straight
to requesting the settlement advance.




## OpenAPI

````yaml openapi/stablefx.yaml post /v1/exchange/stablefx/settlementAdvance/reserve
openapi: 3.1.0
info:
  title: StableFX API
  description: >
    The StableFX API provides endpoints for trading stablecoins.


    ## Authentication

    All API requests require authentication using an API key.


    ## Base URL

    The base URL for all API endpoints is:
    `https://api.circle.com/v1/exchange/stablefx`
  version: 1.0.0
servers:
  - url: https://api.circle.com
    description: StableFX API server
security:
  - BearerAuth: []
tags:
  - name: Quotes
    description: Endpoints for creating and managing quotes
  - name: Trades
    description: Endpoints for creating and managing trades
  - name: Signatures
    description: Endpoints for retrieving presign typed data and registering signatures
  - name: Fees
    description: Endpoints for retrieving fees
  - name: Funding
    description: Endpoints for funding trades
  - name: Webhook Subscriptions
    description: Manage subscriptions to notifications
  - name: Settlement Advance
    description: Request, track, and repay settlement advances.
paths:
  /v1/exchange/stablefx/settlementAdvance/reserve:
    post:
      tags:
        - Settlement Advance
      summary: Reserve settlement advance credit
      description: >
        Holds credit so the maker can lock in a fee snapshot before requesting

        the settlement advance. Reservations expire after a short window (~15

        minutes); after expiry the maker must reserve again.


        Replaying the same `idempotencyKey` returns the existing reservation.

        Submitting a different `idempotencyKey` while another reservation for

        the same currency is still active will be rejected — the maker must

        cancel the active reservation first before creating a new one. There

        is one active reservation allowed per currency.


        A reservation is automatically cancelled after a single settlement
        advance

        is made against it.


        Calling `/reserve` is optional; the maker may skip it and go straight

        to requesting the settlement advance.
      operationId: reserveSettlementAdvance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReserveSettlementAdvance'
      responses:
        '200':
          description: >-
            Reservation created or existing reservation returned on idempotent
            replay.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SettlementAdvanceReservation'
        '400':
          description: Invalid request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Credit line not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            An active reservation for the same currency already exists. Cancel
            the existing reservation before creating a new one.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - BearerAuth: []
components:
  schemas:
    ReserveSettlementAdvance:
      type: object
      description: Request body for reserving settlement advance credit.
      required:
        - idempotencyKey
        - advance
      properties:
        idempotencyKey:
          $ref: '#/components/schemas/IdempotencyKey'
        advance:
          $ref: '#/components/schemas/SettlementAdvanceCurrencyAmount'
    SettlementAdvanceReservation:
      type: object
      description: Settlement advance reservation.
      required:
        - id
        - amount
        - status
        - expirationDate
      properties:
        id:
          $ref: '#/components/schemas/Id'
        amount:
          $ref: '#/components/schemas/SettlementAdvanceCurrencyAmount'
        status:
          $ref: '#/components/schemas/ReservationStatus'
        expirationDate:
          $ref: '#/components/schemas/ExpireDate'
        createDate:
          $ref: '#/components/schemas/CreateDate'
    Error:
      title: Error
      type: object
      required:
        - code
        - message
      properties:
        code:
          $ref: '#/components/schemas/ErrorCode'
        message:
          type: string
          description: Human-readable message that describes the error.
          example: Unknown error occurred
        errors:
          type: array
          description: Array of detailed error descriptions
          items:
            $ref: '#/components/schemas/DescriptiveError'
    IdempotencyKey:
      type: string
      description: >-
        Universally unique identifier (UUID v4) idempotency key. This key is
        utilized to ensure exactly-once execution of mutating requests. To
        create a UUIDv4 go to
        [uuidgenerator.net](https://www.uuidgenerator.net). If the same key is
        reused, it will be treated as the same request and the original response
        will be returned.
      example: a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11
      format: uuid
    SettlementAdvanceCurrencyAmount:
      type: object
      description: Currency and amount for settlement advance flows.
      required:
        - currency
        - amount
      properties:
        currency:
          $ref: '#/components/schemas/SettlementAdvanceCurrency'
        amount:
          $ref: '#/components/schemas/Amount'
    XRequestId:
      type: string
      description: >-
        A unique identifier, which can be helpful for identifying a request when
        communicating with Circle support.
      example: 2adba88e-9d63-44bc-b975-9b6ae3440dde
      format: uuid
    Id:
      type: string
      format: uuid
      description: System-generated unique identifier of the resource.
      example: c4d1da72-111e-4d52-bdbf-2e74a2d803d5
    ReservationStatus:
      type: string
      description: >
        Status of a settlement advance reservation.

        - `active` -- reservation is live; holds available-balance capacity on
        the credit line.

        - `expired` -- reservation window elapsed without an origination
        claiming it; terminal state.

        - `consumed` -- origination claimed this reservation; terminal state.

        - `canceled` -- reservation voided by admin or system action; terminal
        state.
      enum:
        - active
        - expired
        - consumed
        - canceled
      example: active
    ExpireDate:
      type: string
      format: date-time
      description: Date and time when the resource expires
      example: '2023-01-01T12:04:05Z'
    CreateDate:
      type: string
      format: date-time
      description: Date and time when the resource was created
      example: '2023-01-01T12:04:05Z'
    ErrorCode:
      title: ErrorCode
      type: integer
      description: The code that corresponds to the error.
      enum:
        - -1
        - 0
        - 1
        - 2
        - 3
        - 400
        - 401
        - 403
        - 404
    DescriptiveError:
      title: DescriptiveError
      type: object
      required:
        - error
        - message
      properties:
        error:
          $ref: '#/components/schemas/DescriptiveErrorType'
        location:
          type:
            - string
            - 'null'
          description: The key or path where the error occurred
        message:
          type: string
          description: Detailed description of the error
    SettlementAdvanceCurrency:
      type: string
      description: Currency code for settlement advance flows.
      example: USDC
    Amount:
      type: string
      pattern: ^\d+(?:\.\d{1,6})?$
      description: Amount of currency, formatted as a string with up to six decimal places.
      example: '100.00'
    DescriptiveErrorType:
      title: DescriptiveErrorType
      type: string
      enum:
        - MISSING_OR_INVALID_FIELD
      description: Type of descriptive error
  headers:
    XRequestId:
      description: >
        Circle-generated universally unique identifier (UUID v4). Useful for
        identifying a specific request when communicating with Circle Support.
      schema:
        $ref: '#/components/schemas/XRequestId'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: PREFIX:ID:SECRET
      description: >-
        Circle's API Keys are formatted in the following structure
        "PREFIX:ID:SECRET". All three parts are requred to make a successful
        request.

````