> ## 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 an atomic quote

> Price an atomic swap and return the rgb-lib offer your wallet accepts. Check that the offer moves the same amounts and asset as the quote before your wallet signs it.



## OpenAPI

````yaml /openapi.json post /v2/swap/atomic/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/swap/atomic/quote:
    post:
      tags:
        - Atomic RGB swaps
      summary: Get an atomic quote
      description: >-
        Price an atomic swap and return the rgb-lib offer your wallet accepts.
        Check that the offer moves the same amounts and asset as the quote
        before your wallet signs it.
      operationId: quote
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AtomicQuoteRequest'
        required: true
      responses:
        '201':
          description: Quote and rgb-lib offer.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AtomicQuoteResponse'
        '400':
          description: Malformed request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: >-
            Unknown, disabled or unpriceable pair, amount out of range, or not
            enough inventory.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Over the caller-rate or rolling notional budget; carries
            Retry-After.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Atomic swaps are off, or the rgb wallet, quoting engine or database
            is unavailable.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    AtomicQuoteRequest:
      type: object
      description: '`POST /v2/swap/atomic/quote`.'
      required:
        - pair
        - amount
      properties:
        amount:
          type: integer
          format: int64
          description: Sats for BTC, the RGB contract's smallest unit for the asset.
          minimum: 1
        direction:
          $ref: '#/components/schemas/AtomicAmountDirection'
        pair:
          type: string
          description: '`BTC/USDT-RGB` (send BTC, receive USDT-RGB) or `USDT-RGB/BTC`.'
    AtomicQuoteResponse:
      type: object
      required:
        - id
        - pair
        - direction
        - fromAmount
        - toAmount
        - assetId
        - networkFeeSat
        - serviceFee
        - expiresAt
        - offerExpiresAt
        - offer
      properties:
        assetId:
          type: string
          description: The RGB contract of the RGB leg.
        direction:
          $ref: '#/components/schemas/AtomicAmountDirection'
        expiresAt:
          type: integer
          format: int64
          description: 'Unix seconds: the request must arrive before this.'
        fromAmount:
          type: integer
          format: int64
          description: What the taker sends.
          minimum: 0
        id:
          type: string
        networkFeeSat:
          type: integer
          format: int64
          description: Miner fee the taker funds on top of `fromAmount`, sats.
          minimum: 0
        offer:
          type: object
          description: rgb-lib's offer, for the taker's `accept_swap_offer`.
        offerExpiresAt:
          type: integer
          format: int64
          description: 'Unix seconds: the completion must arrive before this.'
        pair:
          type: string
        serviceFee:
          type: integer
          format: int64
          description: |-
            The maker's fee, in the output asset's units: sats, or the RGB
            contract's.
          minimum: 0
        toAmount:
          type: integer
          format: int64
          description: What the taker receives, net of the maker's fee.
          minimum: 0
    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`.
    AtomicAmountDirection:
      type: string
      description: Which amount of a quote request is fixed.
      enum:
        - from
        - to

````

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