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

# Get a quote

> Price a specific amount on a pair without creating a swap.



## OpenAPI

````yaml /openapi.json post /v2/quote
openapi: 3.1.0
info:
  title: KaleidoSwap Maker API
  version: v2
  description: >-
    Public HTTP API of the KaleidoSwap maker. Wire-compatible with the Boltz
    `/v2` protocol for submarine, reverse, and chain swaps, with KaleidoSwap
    additions (RGB, atomic swaps, pay-through, LSPS1, swap credentials).
    Integrate through the Swap SDK where possible: it verifies every swap the
    maker proposes.
  contact:
    name: KaleidoSwap
    url: https://kaleidoswap.com
servers:
  - url: https://maker.signet.kaleidoswap.com
    description: Signet (Mutinynet)
security: []
tags:
  - name: Service
    description: Maker identity, version, and capabilities.
  - name: Pairs and quotes
    description: Routes the maker trades, their limits and fees, and quotes.
  - name: Submarine swaps
    description: On-chain → Lightning. You lock on chain; the maker pays your invoice.
  - name: Reverse swaps
    description: >-
      Lightning → on-chain. You pay a hold invoice; the maker locks on chain;
      you claim.
  - name: Chain swaps
    description: On-chain → on-chain. Both sides lock; you claim the maker's lockup.
  - name: Swap status
    description: Swap status over HTTP and WebSocket.
  - name: Recovery
    description: Restore swaps from an xpub and recover swap credentials.
  - name: Atomic RGB swaps
    description: BTC ↔ RGB asset swaps in a single transaction.
  - name: Pay-through
    description: Lightning payment → on-chain payout to any address.
  - name: Lightning channels (LSPS1)
    description: Buy inbound Lightning channels (LSPS1).
  - name: Chain data
    description: The maker's view of chain tips and fees.
paths:
  /v2/quote:
    post:
      tags:
        - Pairs and quotes
      summary: Get a quote
      description: Price a specific amount on a pair without creating a swap.
      operationId: get_quote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/QuoteRequest'
        required: true
      responses:
        '200':
          description: Priced quote + pair-hash rate lock.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
        '422':
          description: Unknown pair, out-of-range amount, or feed unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Over the per-caller quote budget; carries Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            No quoting engine configured, the pair/network is suspended by the
            operator, or a BTC L1 reverse route has no usable fee rate.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    QuoteRequest:
      type: object
      description: Body of `POST /v2/quote`.
      required:
        - swapType
        - pairId
        - fromAmount
      properties:
        fromAmount:
          type: integer
          format: int64
          description: |-
            Amount the taker would send, in the *input* asset's smallest units —
            for an RGB asset, its contract's.
          minimum: 0
        pairId:
          type: string
          description: Pair key, e.g. `"BTC/BTC"`.
        swapType:
          type: string
          description: |-
            Which swap family — `"submarine"` / `"reverse"` / `"chain"`. Pair
            ids are scoped per kind: `BTC/BTC` exists in both Submarine and
            Reverse as separate cards.
          example: submarine
    QuoteResponse:
      type: object
      description: '`POST /v2/quote` response.'
      required:
        - pairId
        - fromAmount
        - toAmount
        - grossOutput
        - fees
        - rate
        - hash
        - validUntil
      properties:
        fees:
          $ref: '#/components/schemas/QuoteFees'
          description: Fee breakdown for this quote, in the output asset's units.
        fromAmount:
          type: integer
          format: int64
          description: |-
            Amount the taker would send, smallest unit of the input asset. An
            RGB asset counts its contract's precision here and in every amount
            below.
          minimum: 0
        grossOutput:
          type: integer
          format: int64
          description: 'Gross output before fees: `toAmount + fees.total`.'
          minimum: 0
        hash:
          type: string
          description: |-
            Pair-config hash — the `pairHash` the taker passes back on create
            to rate-lock.
        pairId:
          type: string
          description: Pair key, e.g. `"BTC/BTC"`.
        rate:
          type: number
          format: double
        toAmount:
          type: integer
          format: int64
          description: |-
            Amount the taker would receive after fees & spread; the same number
            a create for `fromAmount` pays out.
          minimum: 0
        validUntil:
          type: integer
          format: int64
          description: Unix-seconds timestamp past which the quote is stale.
    ErrorResponse:
      type: object
      description: Boltz-shaped error envelope.
      required:
        - error
      properties:
        details:
          type:
            - string
            - 'null'
          description: Optional human-readable detail. Present on 4xx; absent on 5xx.
        error:
          type: string
          description: Stable machine-readable error code, e.g. `pair_hash_mismatch`.
    QuoteFees:
      type: object
      required:
        - protocol
        - network
        - swap
        - total
      properties:
        network:
          type: integer
          format: int64
          description: Network/miner fee component.
          minimum: 0
        protocol:
          type: integer
          format: int64
          description: Maker spread (the protocol-side fee).
          minimum: 0
        swap:
          type: integer
          format: int64
          description: Maker swap fee.
          minimum: 0
        total:
          type: integer
          format: int64
          description: '`protocol + network + swap`.'
          minimum: 0

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.