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

# Order a channel

> Price and create a channel order. Returns the payment details.



## OpenAPI

````yaml /openapi.json post /v2/lsps1/order
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/lsps1/order:
    post:
      tags:
        - Lightning channels (LSPS1)
      summary: Order a channel
      description: Price and create a channel order. Returns the payment details.
      operationId: create_lsps1_order
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '201':
          description: Order created; pay the returned address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lsps1OrderResponse'
        '400':
          description: Invalid balance, expiry, or pubkey.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: >-
            Database or node unavailable, LSPS1 not configured, or the LN
            network is suspended by the operator.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    CreateOrderRequest:
      type: object
      description: '`POST /v2/lsps1/order` body — LSPS1 `create_order` params (snake_case).'
      required:
        - lsp_balance_sat
        - channel_expiry_blocks
        - public_key
      properties:
        address:
          type:
            - string
            - 'null'
          description: |-
            Optional `host:port` the maker connects to before opening. If
            omitted the client must already be peered with the maker.
        announce_channel:
          type:
            - boolean
            - 'null'
        channel_expiry_blocks:
          type: integer
          format: int32
          minimum: 0
        client_balance_sat:
          type:
            - string
            - 'null'
          description: Sats the LSP pushes to the client's side at open. Decimal string.
        funding_confirms_within_blocks:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
        lsp_balance_sat:
          type: string
          description: Inbound liquidity (sats) the client wants. Decimal string per spec.
        public_key:
          type: string
          description: |-
            The client's node id (33-byte hex) — who the maker opens the
            channel to.
        refund_onchain_address:
          type:
            - string
            - 'null'
          description: Where to refund the on-chain payment if the order fails.
        required_channel_confirmations:
          type:
            - integer
            - 'null'
          format: int32
          minimum: 0
    Lsps1OrderResponse:
      type: object
      description: '`POST /v2/lsps1/order` & `GET /v2/lsps1/order/{id}` response.'
      required:
        - order_id
        - lsp_balance_sat
        - client_balance_sat
        - required_channel_confirmations
        - funding_confirms_within_blocks
        - channel_expiry_blocks
        - announce_channel
        - order_state
        - payment
      properties:
        announce_channel:
          type: boolean
        channel:
          oneOf:
            - $ref: '#/components/schemas/Lsps1Channel'
            - type: 'null'
        channel_expiry_blocks:
          type: integer
          format: int32
          minimum: 0
        client_balance_sat:
          type: string
        created_at:
          type:
            - string
            - 'null'
        expired_at:
          type:
            - string
            - 'null'
        expires_at:
          type:
            - string
            - 'null'
        funding_confirms_within_blocks:
          type: integer
          format: int32
          minimum: 0
        lsp_balance_sat:
          type: string
        order_id:
          type: string
        order_state:
          type: string
          description: '`CREATED` / `COMPLETED` / `FAILED` / `EXPIRED`.'
        payment:
          $ref: '#/components/schemas/Lsps1Payment'
        required_channel_confirmations:
          type: integer
          format: int32
          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`.
    Lsps1Channel:
      type: object
      required:
        - funding_outpoint
      properties:
        expires_at:
          type:
            - string
            - 'null'
        funded_at:
          type:
            - string
            - 'null'
        funding_outpoint:
          type: string
    Lsps1Payment:
      type: object
      required:
        - state
        - fee_total_sat
        - order_total_sat
        - onchain
      properties:
        bolt11:
          type:
            - string
            - 'null'
        fee_total_sat:
          type: string
        onchain:
          $ref: '#/components/schemas/Lsps1Onchain'
        order_total_sat:
          type: string
        state:
          type: string
          description: '`EXPECT_PAYMENT` / `PAID` / `REFUNDED`.'
    Lsps1Onchain:
      type: object
      required:
        - address
        - min_onchain_payment_confirmations
        - min_fee_for_0conf
      properties:
        address:
          type: string
        min_fee_for_0conf:
          type: integer
          format: int32
          minimum: 0
        min_onchain_payment_confirmations:
          type: integer
          format: int32
          minimum: 0
        payment_txid:
          type:
            - string
            - 'null'
        refund_onchain_address:
          type:
            - string
            - 'null'

````

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