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

# Get Quote

> Get quotes across 6 protocols



## OpenAPI

````yaml /api-reference/openapi.json GET /quote
openapi: 3.0.3
info:
  title: Leokit API
  version: 1.0.0
  description: API reference for Leokit
servers:
  - url: https://api.leokit.dev
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /quote:
    get:
      summary: Get quote
      parameters:
        - name: from_asset
          in: query
          required: true
          description: Input asset identifier.
          schema:
            type: string
            default: ETH.ETH
          example: ETH.ETH, ETH.USDC-0XAF88D065E77C8CC2239327C5EDB3A432268E5831
        - name: to_asset
          in: query
          required: true
          description: Output asset identifier.
          schema:
            type: string
            default: BTC.BTC
          example: BTC.BTC, THOR.RUNE
        - name: origin
          in: query
          required: true
          description: From wallet address.
          schema:
            type: string
            default: '0xacd9a974065de9c7a19873f95af7595e1d632167'
          example: '0xacd9a974065de9c7a19873f95af7595e1d632167'
        - name: destination
          in: query
          required: true
          description: To wallet address.
          schema:
            type: string
            default: bc1q2hk2q3zy7pdh0tp4awzn4k5lyetedaue5zt88r
          example: bc1q2hk2q3zy7pdh0tp4awzn4k5lyetedaue5zt88r
        - name: amount
          in: query
          required: true
          description: 'Amount to swap (Example: 1 ETH)'
          schema:
            type: string
            default: '1'
          example: '1'
      responses:
        '200':
          description: >-
            Quote response across multiple protocols. The response may include a
            subset of protocols depending on availability.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QuoteResponse'
              example:
                quotes:
                  - protocol: near
                    data:
                      total_swap_seconds: 490
                      expected_amount_out: 3342470
                      fees:
                        - type: Network Fee
                          asset: USD
                          amount: 0
                          usd: '5.75'
                      route: []
                      protocol: near
                    expectedAmountOutNum: 3342470
                    totalFeesUsd: 5.75
                    totalSwapSeconds: 490
                    flags:
                      - FASTEST
                      - CHEAPEST
                      - OPTIMAL
                  - protocol: thorchain
                    data:
                      protocol: thorchain
                      expected_amount_out: 3338260
                      route:
                        - ETH.ETH
                        - BTC.BTC
                      fees:
                        - type: Affiliate Fee
                          asset: BTC.BTC
                          amount: 0
                          usd: 0
                        - type: Outbound Fee
                          asset: BTC.BTC
                          amount: 0.00001815
                          usd: 1.5934358179613117
                        - type: Network Fee
                          asset: BTC.BTC
                          amount: 0.00006691
                          usd: 5.874203337729551
                    expectedAmountOutNum: 3338260
                    totalFeesUsd: 7.467639155690862
                    totalSwapSeconds: null
                    flags: []
                  - protocol: mayachain
                    data:
                      protocol: mayachain
                      expected_amount_out: 3315430
                      route:
                        - ETH.ETH
                        - BTC.BTC
                      fees:
                        - type: Affiliate Fee
                          asset: BTC.BTC
                          amount: 0
                          usd: 0
                        - type: Outbound Fee
                          asset: BTC.BTC
                          amount: 0.00003
                          usd: 2.6337782115063004
                        - type: Network Fee
                          asset: BTC.BTC
                          amount: 0.00015052
                          usd: 13.21454321319761
                    expectedAmountOutNum: 3315430
                    totalFeesUsd: 15.84832142470391
                    totalSwapSeconds: null
                    flags: []
                timestamp: '2025-12-23T18:18:14.213Z'
                quote_id: 019b4c6e-d6c2-7000-b851-48a863f2f4b7
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    QuoteResponse:
      type: object
      required:
        - quotes
        - timestamp
        - quote_id
      properties:
        quotes:
          type: array
          description: Quotes returned by available protocols. May be empty.
          items:
            $ref: '#/components/schemas/QuoteItem'
        timestamp:
          type: string
          format: date-time
          description: Timestamp when the quote was generated.
        quote_id:
          type: string
          format: uuid
          description: Quote identifier. Use this in subsequent /deposit and /status calls.
    QuoteItem:
      type: object
      description: >-
        A quote produced by a single protocol. Only protocols with available
        quotes are returned.
      required:
        - protocol
        - data
        - expectedAmountOutNum
        - totalFeesUsd
        - totalSwapSeconds
        - flags
      properties:
        protocol:
          type: string
          description: >-
            Protocol that generated this quote. LeoKit supports 6 protocols in
            total; this list can be a subset depending on availability.
        data:
          $ref: '#/components/schemas/QuoteData'
        expectedAmountOutNum:
          type: number
          description: Normalized expected output amount (numeric).
        totalFeesUsd:
          type: number
          description: Total fees for this quote in USD.
        totalSwapSeconds:
          type: integer
          nullable: true
          description: >-
            Estimated total swap time in seconds. Returns null when not
            available for that protocol.
        flags:
          type: array
          description: >-
            Flags describing why this quote is selected (e.g., FASTEST,
            CHEAPEST, OPTIMAL).
          items:
            type: string
    Error:
      type: object
      description: Generic error payload.
      properties:
        message:
          type: string
        code:
          type: string
    QuoteData:
      type: object
      description: Protocol-specific quote details. Shape varies by protocol.
      properties:
        protocol:
          type: string
          description: Protocol identifier that produced this data object.
        expected_amount_out:
          type: number
          description: Expected amount out before applying LeoKit normalization.
        total_swap_seconds:
          type: integer
          description: Estimated total swap time in seconds (when available).
          nullable: true
        route:
          type: array
          description: Protocol route (when available).
          items:
            type: string
        fees:
          type: array
          description: Protocol-provided fees (when available).
          items:
            $ref: '#/components/schemas/QuoteFee'
      additionalProperties: true
    QuoteFee:
      type: object
      description: A fee applied to the quote.
      required:
        - type
        - asset
        - amount
        - usd
      properties:
        type:
          type: string
          description: Fee type (e.g., Network Fee, Outbound Fee, Affiliate Fee).
        asset:
          type: string
          description: Fee asset identifier.
        amount:
          type: number
          description: Fee amount denominated in the fee asset.
        usd:
          description: Fee value in USD. Some protocols return this as a string.
          oneOf:
            - type: number
            - type: string
  responses:
    ErrorResponse:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Api-Key
      description: 'Demo API-Key (Sandbox): 7037d2b3-9c76-4f62-b730-c544f7570fa4'

````