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

# Submit LSPS1 rate decision

> Resolve an LSPS1 repricing event after the maker has moved the order into `PENDING_RATE_DECISION`. Clients must supply the per-order `access_token`. Accepting a new rate resumes the order with fresh pricing; declining initiates refund handling.



## OpenAPI

````yaml /openapi.json post /api/v1/lsps1/rate_decision
openapi: 3.1.0
info:
  title: Kaleidoswap RGB-LSP API
  summary: Public KaleidoSwap Maker API contract
  description: >-
    Public Maker API for KaleidoSwap market data, quotes, atomic swaps, and RGB
    LSPS1

    channel operations.


    Maker endpoints support Bearer API-key authentication. During rollout,

    deployments may accept anonymous requests while attribution is collected;
    once

    API-key enforcement is enabled, requests without a valid `kld_...` key
    return

    `401`.


    Use the per-order `access_token` returned by LSPS1 channel-order creation
    when

    polling protected order status endpoints or submitting a rate decision after
    the

    maker requests client confirmation.
  version: 0.2.0
  termsOfService: https://kaleidoswap.com/terms
  contact:
    name: Kaleidoswap Team
    email: info@kaleidoswap.com
    url: https://kaleidoswap.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  x-support:
    email: contact@kaleidoswap.com
    documentation: https://docs.kaleidoswap.com/api-reference/introduction
  x-build-info:
    version: archive/settlement-backends-pre-removal-7-gb8788aa2
    commit: b8788aa257ea4a01ac0dffc1826cf3bcf1caf09f
    buildDate: '2026-08-05T09:57:35.455127+00:00'
servers:
  - url: http://localhost:8000
    description: Local development
security: []
tags:
  - name: lsps1
    description: >-
      RGB LSPS1 liquidity endpoints for capability discovery, channel-order
      creation, fee estimation, order tracking, rate decisions, and asset
      delivery retries.
  - name: market
    description: >-
      Public market discovery APIs for assets, trading pairs, routes, and
      RFQ-based quote requests.
  - name: swaps
    description: >-
      Atomic swap APIs used by direct RLN integrations to initialize, execute,
      and track swaps.
paths:
  /api/v1/lsps1/rate_decision:
    post:
      tags:
        - lsps1
      summary: Submit LSPS1 rate decision
      description: >-
        Resolve an LSPS1 repricing event after the maker has moved the order
        into `PENDING_RATE_DECISION`. Clients must supply the per-order
        `access_token`. Accepting a new rate resumes the order with fresh
        pricing; declining initiates refund handling.
      operationId: submitLspRateDecision
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RateDecisionRequest'
            examples:
              accept_repriced_order:
                summary: Accept updated asset price
                value:
                  order_id: 550e8400-e29b-41d4-a716-446655440000
                  access_token: ord_live_3rCkP9dG7mN4
                  accept_new_rate: true
        required: true
      responses:
        '200':
          description: Rate decision accepted and processed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateDecisionResponse'
              example:
                order_id: 550e8400-e29b-41d4-a716-446655440000
                decision_accepted: true
                message: Rate accepted. Order will proceed with current market rate.
        '400':
          description: >-
            The order is not awaiting a rate decision or the access token is
            invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KaleidoErrorResponse'
              example:
                error_code: VALIDATION_ERROR
                message: 'Order is not pending rate decision. Current state: COMPLETED'
                details: {}
                request_id: req_01HV8Q9X7G0Q7Y3Z
        '401':
          description: Missing or invalid Bearer API key.
          content:
            application/json:
              example:
                error: missing_api_key
              schema:
                $ref: '#/components/schemas/ApiKeyAuthErrorResponse'
        '404':
          description: No LSPS1 order exists for the supplied order ID.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KaleidoErrorResponse'
              example:
                error_code: LSPS1_ORDER_NOT_FOUND
                message: Order Not found
                details:
                  code: 101
                request_id: req_01HV8Q9X7G0Q7Y3Z
        '422':
          description: Request validation failed before reaching application logic.
          content:
            application/json:
              example:
                detail:
                  - loc:
                      - body
                      - rfq_id
                    msg: Field required
                    type: missing
              schema:
                $ref: '#/components/schemas/FastAPIValidationErrorResponse'
        '429':
          description: Too many requests. Respect the rate-limit headers before retrying.
          content:
            application/json:
              example:
                error_code: RATE_LIMIT_EXCEEDED
                message: Too many requests
                details:
                  retry_after: 60
                request_id: req_01HV8Q9X7G0Q7Y3Z
              schema:
                $ref: '#/components/schemas/KaleidoErrorResponse'
        '500':
          description: Unhandled server error.
          content:
            application/json:
              example:
                error_code: INTERNAL_ERROR
                message: Internal Server Error
                details: {}
                request_id: req_01HV8Q9X7G0Q7Y3Z
              schema:
                $ref: '#/components/schemas/KaleidoErrorResponse'
        '503':
          description: Fresh market pricing is currently unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KaleidoErrorResponse'
              example:
                error_code: SERVICE_UNAVAILABLE
                message: Current market price unavailable. Please try again.
                details: {}
                request_id: req_01HV8Q9X7G0Q7Y3Z
      security:
        - KaleidoApiKey: []
components:
  schemas:
    RateDecisionRequest:
      properties:
        order_id:
          type: string
          title: Order Id
        access_token:
          type: string
          title: Access Token
          default: ''
        accept_new_rate:
          type: boolean
          title: Accept New Rate
      type: object
      required:
        - order_id
        - accept_new_rate
      title: RateDecisionRequest
      description: Request for user to accept new rate or request refund
      example:
        accept_new_rate: true
        access_token: ord_live_3rCkP9dG7mN4
        order_id: 550e8400-e29b-41d4-a716-446655440000
    RateDecisionResponse:
      properties:
        order_id:
          type: string
          title: Order Id
        decision_accepted:
          type: boolean
          title: Decision Accepted
        message:
          type: string
          title: Message
        refund_txid:
          anyOf:
            - type: string
            - type: 'null'
          title: Refund Txid
      type: object
      required:
        - order_id
        - decision_accepted
        - message
      title: RateDecisionResponse
      description: Response after user makes rate decision
      example:
        message: Order queued for immediate asset-delivery retry.
        status: processing
    KaleidoErrorResponse:
      properties:
        error_code:
          type: string
          title: Error Code
          description: Stable machine-readable application error code
          examples:
            - PAIR_NOT_FOUND
        message:
          type: string
          title: Message
          description: Human-readable error message
          examples:
            - 'Trading pair not found: BTC/USDT'
        details:
          additionalProperties: true
          type: object
          title: Details
          description: Optional structured error details
        request_id:
          type: string
          title: Request Id
          description: Request correlation identifier for support and debugging
          examples:
            - req_01HV8Q9X7G0Q7Y3Z
      type: object
      required:
        - error_code
        - message
        - request_id
      title: KaleidoErrorResponse
    ApiKeyAuthErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: API-key authentication error code
          examples:
            - missing_api_key
            - invalid_api_key
      type: object
      required:
        - error
      title: ApiKeyAuthErrorResponse
    FastAPIValidationErrorResponse:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationErrorDetail'
          type: array
          title: Detail
      type: object
      required:
        - detail
      title: FastAPIValidationErrorResponse
    ValidationErrorDetail:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Loc
          description: Location of the validation failure
          examples:
            - - body
              - rfq_id
        msg:
          type: string
          title: Msg
          description: Validation error message
          examples:
            - Field required
        type:
          type: string
          title: Type
          description: FastAPI/Pydantic validation error type
          examples:
            - missing
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationErrorDetail
  securitySchemes:
    KaleidoApiKey:
      type: http
      scheme: bearer
      bearerFormat: Kaleido API key
      description: Pass a Kaleido API key such as `kld_live_c_...`.

````