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

# Estimate Channel Fees

> Calculate channel opening fees without creating an order

## When to Use

Use this endpoint to show users the expected fees before they commit to opening a channel.

<Tip>For asset purchases, always provide an `rfq_id` to get accurate pricing.</Tip>


## OpenAPI

````yaml /openapi.json post /api/v1/lsps1/estimate_fees
openapi: 3.1.0
info:
  title: Kaleidoswap RGB-LSP API
  description: API for managing swaps and channels
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/lsps1/estimate_fees:
    post:
      tags:
        - lsps1
      summary: Estimate Fees
      description: >-
        Estimate channel fees based on the provided parameters without creating
        an order.

        For asset purchases (client_asset_amount > 0), rfq_id must be provided
        to calculate accurate fees.
      operationId: estimate_fees_api_v1_lsps1_estimate_fees_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrderRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelFees'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateOrderRequest:
      properties:
        client_pubkey:
          type: string
          title: Client Pubkey
        lsp_balance_sat:
          type: integer
          minimum: 0
          title: Lsp Balance Sat
        client_balance_sat:
          type: integer
          minimum: 0
          title: Client Balance Sat
        required_channel_confirmations:
          type: integer
          minimum: 0
          title: Required Channel Confirmations
        funding_confirms_within_blocks:
          type: integer
          minimum: 1
          title: Funding Confirms Within Blocks
        channel_expiry_blocks:
          type: integer
          minimum: 1
          title: Channel Expiry Blocks
        token:
          anyOf:
            - type: string
            - type: 'null'
          title: Token
        refund_onchain_address:
          anyOf:
            - type: string
            - type: 'null'
          title: Refund Onchain Address
        announce_channel:
          type: boolean
          title: Announce Channel
          default: true
        asset_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Asset Id
        lsp_asset_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lsp Asset Amount
        client_asset_amount:
          anyOf:
            - type: integer
            - type: 'null'
          title: Client Asset Amount
        rfq_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Rfq Id
        email:
          anyOf:
            - type: string
            - type: 'null'
          title: Email
          description: Optional email for notifications
      type: object
      required:
        - client_pubkey
        - lsp_balance_sat
        - client_balance_sat
        - required_channel_confirmations
        - funding_confirms_within_blocks
        - channel_expiry_blocks
      title: CreateOrderRequest
    ChannelFees:
      properties:
        setup_fee:
          type: integer
          title: Setup Fee
        capacity_fee:
          type: integer
          title: Capacity Fee
        duration_fee:
          type: integer
          title: Duration Fee
        total_fee:
          type: integer
          title: Total Fee
        applied_discount:
          anyOf:
            - type: number
            - type: 'null'
          title: Applied Discount
        discount_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Discount Code
      type: object
      required:
        - setup_fee
        - capacity_fee
        - duration_fee
        - total_fee
      title: ChannelFees
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````