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

# Get quote

> This endpoint allows you to get quote for swaps.



## OpenAPI

````yaml openapi.json post /quote/swap
openapi: 3.0.3
info:
  title: Bread API
  description: >-
    The Bread provides comprehensive cryptocurrency wallet management
    capabilities including wallet creation, balance monitoring, and asset
    transfers.
  version: 2.0.0
servers:
  - url: https://processor-prod.up.railway.app
    description: Production server
security: []
paths:
  /quote/swap:
    post:
      tags:
        - Swap
      summary: Get quote
      description: This endpoint allows you to get quote for swaps.
      operationId: getSwapQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SwapQuoteRequest'
      responses:
        '200':
          description: Swap quote fetched successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SwapQuoteResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    SwapQuoteRequest:
      type: object
      required:
        - wallet_id
        - receiver
        - from_asset
        - to_asset
      properties:
        wallet_id:
          type: string
          description: The wallet ID to swap from
          example: 68bb7d8399900e253084e6f9
        from_amount:
          type: number
          description: |-
            Amount to swap. Use **-1** to swap all available balance.

            Use this for **EXACT INPUT** swaps.
          example: -1
        to_amount:
          type: number
          description: |-
            Amount of the `to_asset` you want to receive.

            Use this for **EXACT OUTPUT** swaps.
          example: 100
        receiver:
          type: string
          description: The recipient address for the swapped assets
          example: '0x4ad21FA456Bb297f505B2718ba87ad63D8a95E6B'
        from_asset:
          type: string
          enum:
            - ethereum:usdc
            - base:usdc
            - arbitrum:usdc
            - solana:usdc
            - bsc:usdc
            - polygon:usdc
            - optimism:usdc
            - avalanche:usdc
            - ethereum:usdt
            - arbitrum:usdt
            - solana:usdt
            - polygon:usdt
            - bsc:usdt
            - optimism:usdt
            - avalanche:usdt
            - base:cngn
            - bsc:cngn
          description: The asset to swap from
          example: solana:usdc
        to_asset:
          type: string
          enum:
            - ethereum:usdc
            - base:usdc
            - arbitrum:usdc
            - solana:usdc
            - bsc:usdc
            - polygon:usdc
            - optimism:usdc
            - avalanche:usdc
            - ethereum:usdt
            - arbitrum:usdt
            - solana:usdt
            - polygon:usdt
            - bsc:usdt
            - optimism:usdt
            - avalanche:usdt
            - base:cngn
            - bsc:cngn
          description: The asset to swap to
          example: base:usdc
    SwapQuoteResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        status:
          type: integer
          example: 200
        message:
          type: string
          example: Swap quote fetched successfully
        timestamp:
          type: string
          format: date-time
          example: '2025-09-09T21:09:46.572Z'
        data:
          type: object
          properties:
            input_amount:
              type: number
              description: The actual amount that will be swapped from the source asset
              example: 4
            output_amount:
              type: number
              description: The expected amount to receive in the target asset
              example: 3.997592
            min_output_amount:
              type: number
              description: >-
                The minimum amount guaranteed to receive (accounting for
                slippage)
              example: 3.993592
            price_impact:
              type: number
              description: The price impact of the swap as a percentage
              example: 0.06
            duration:
              type: integer
              description: Estimated duration of the swap in seconds
              example: 22
            rate:
              type: number
              description: Exchange rate between the assets
              example: 0.9993
            input_amount_usd:
              type: number
              description: USD value of the input amount
              example: 3.9996
            output_amount_usd:
              type: number
              description: USD value of the output amount
              example: 3.9972
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-service-key

````