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

> ## Agent Instructions
> Soroswap Aggregator API: base URL https://api.soroswap.finance, pick the network with ?network=mainnet or ?network=testnet (omitted means mainnet).
> Auth: Authorization: Bearer sk_... on every call. Get a key at https://console.soroswap.finance/register. A missing or invalid key returns 401 with code and registerUrl (POST /send returns 403 instead); an expired JWT or a missing role returns 403. Free plan 1 request/s; see https://docs.soroswap.finance/api/plans.md.
> Flow: POST /quote (assetIn, assetOut as C... contract addresses, amount as an integer string in the smallest unit, tradeType, protocols) -> POST /quote/build with the unchanged quote and from -> the user signs the XDR -> POST /send. Build right after quoting: a Soroban XDR is valid for 180 seconds. Submit it as is, never re-simulate it.
> Partner id: every account has one (9 hex chars, permanent). Read partnerId from GET /partner, or in the console at https://console.soroswap.finance under Fees & payouts. The partner fee itself is switched on by Soroswap; see https://docs.soroswap.finance/api/fees.md.
> AI tools: docs MCP at https://docs.soroswap.finance/mcp (claude mcp add --transport http soroswap-docs https://docs.soroswap.finance/mcp), skill with npx skills add https://docs.soroswap.finance. Other clients: https://docs.soroswap.finance/api/build-with-ai.md.
> Units and Stellar pitfalls: https://docs.soroswap.finance/api/stellar-gotchas.md. Errors and retries: https://docs.soroswap.finance/api/errors.md.

# Bridge quote

> Mainnet only. Prices a USDC or USDT transfer between chains. amount is an integer string in the token's smallest units (Stellar 7 decimals, other chains 6). Returns amountIn, amountOut (guaranteed minimum), fees, limits.minAmountIn, recipient readiness and claimRequired. 400 Amount too small.



## OpenAPI

````yaml POST /bridge/quote
openapi: 3.0.0
info:
  title: Soroswap API
  description: >+

    # 🚀 Soroswap API


    **Soroswap.Finance** is both an **Automated Market Maker (AMM)** and a **DEX
    Aggregator** on the Stellar blockchain.


    It aggregates liquidity from Soroban DEXes (**Soroswap, Phoenix, Aqua and
    Comet(TBA)**), and the **Stellar Classic DEX** — giving you **the best trade
    routes, liquidity tools, and real-time market data**.


    ---


    ## 📋 What You Can Do


    - 🔄 **Quote** – Get the best trade route between two assets with
    split-routing logic across AMMs and SDEX.  

    - 🧱 **Build** – Generate and simulate unsigned transactions (XDR) for swaps
    or liquidity actions.  

    - 🚀 **Send** – Submit signed transactions via Soroban RPC or Horizon.

    - ⚡ **Gasless Trustlines** – Use `gaslessTrustline` in `/quote` to open
    trustlines for users without requiring them to hold XLM or deal with
    trustline setup themselves.

    - 💰 **Platform Fees** – Add your own fee to user swaps with
    `platformFee`.  

    - 💧 **Liquidity** – Create LPs, add liquidity, remove liquidity.  

    - 💲 **Price** – Get real-time token prices.  

    - 🧠 **Pools** – View detailed pool information for Soroswap AMM.


    📮 **[Downnload the Postman Collection
    here](https://drive.google.com/drive/folders/1G-LQYE2EojPWP1CSuuS_tDb9vjYbFR6E?usp=drive_link)**


    ---


    ## 🔑 Authentication


    Send `Authorization: Bearer <credential>`: an API key (`sk_...`) or the JWT
    access token from `POST /login`. Each operation's `security` says whether it
    needs one; `security: []` means it is public.


    - **401**: no credential, or an invalid API key. The body says where to get
    a key, and `WWW-Authenticate` is set.

    - **403**: an expired or invalid JWT, or a valid credential without the
    required role.

    - `POST /send` answers **403** for any missing or invalid credential.

  version: '1.0'
  contact: {}
  x-logo:
    url: https://links.paltalabs.io/soroswap-full.svg
    backgroundColor: '#0e0e0e'
    altText: Soroswap Logo
    href: https://soroswap.finance
servers: []
security: []
tags: []
paths:
  /bridge/quote:
    post:
      tags:
        - Bridge
      summary: Bridge quote
      description: >-

        Quotes a cross-chain transfer. `amountOut` is the guaranteed minimum
        received. USDC fees come

        from Circle's Iris (`maxFee` caps them; the fee actually charged never
        exceeds it). USDT fees come

        from the OFT's own quote; the LayerZero messaging fee is paid separately
        in the source native token.

        Into Stellar, USDC must be claimed on Stellar (`claimRequired`). With a
        `recipient`, the quote

        checks it can receive (trustline, Solana token account) and fails closed
        when that check can't run.
      operationId: BridgeController_quote
      parameters:
        - name: network
          required: false
          in: query
          description: Mainnet only; testnet answers 400
          schema:
            enum:
              - testnet
              - mainnet
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BridgeQuoteDto'
            examples:
              usdcExactIn:
                value:
                  asset: USDC
                  sourceChain: base
                  destinationChain: stellar
                  amount: '10000000'
                  tradeType: EXACT_IN
              usdtExactOut:
                value:
                  asset: USDT
                  sourceChain: stellar
                  destinationChain: arbitrum
                  amount: '5000000'
                  tradeType: EXACT_OUT
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BridgeQuoteResponse'
        '400':
          description: >-
            Unknown chain, no route, invalid address, testnet, amount out of
            limits, or a Solana recipient nobody could move funds from (a token
            account or a mint, or an off-curve address with no account): paste
            the wallet address
        '401':
          description: >-
            No credential, an invalid API key, or a valid JWT of a disabled
            account. Except for the disabled account, the answer carries
            `WWW-Authenticate` and a `registerUrl`.
        '403':
          description: >-
            An expired or invalid JWT, or a valid credential without the
            required role.
        '503':
          description: Iris, LayerZero or an RPC could not answer
      security:
        - bearer: []
components:
  schemas:
    BridgeQuoteDto:
      type: object
      properties:
        asset:
          type: string
          enum:
            - USDC
            - USDT
          example: USDC
        sourceChain:
          type: string
          example: base
          description: Source chain id, from GET /bridge/routes
        destinationChain:
          type: string
          example: stellar
          description: Destination chain id, from GET /bridge/routes
        amount:
          type: string
          example: '10000000'
          description: >-
            Smallest units of the token on the chain the amount refers to: the
            source for EXACT_IN, the destination for EXACT_OUT. Stellar tokens
            have 7 decimals, every other chain's 6.
        tradeType:
          type: string
          enum:
            - EXACT_IN
            - EXACT_OUT
          example: EXACT_IN
        speed:
          type: string
          enum:
            - standard
            - fast
          default: standard
          description: >-
            USDC only. Fast falls back to standard where the source has no Fast
            Transfer.
        sender:
          type: string
          description: Source-chain address that signs (a G… account on Stellar)
        recipient:
          type: string
          description: >-
            Destination-chain address. With it the quote checks the recipient
            (trustline, Solana token account); without it, a Solana destination
            is quoted with the token-account creation fee.
      required:
        - asset
        - sourceChain
        - destinationChain
        - amount
        - tradeType
    BridgeQuoteResponse:
      type: object
      properties:
        asset:
          type: string
          enum:
            - USDC
            - USDT
        sourceChain:
          type: string
          example: base
        destinationChain:
          type: string
          example: stellar
        tradeType:
          type: string
          enum:
            - EXACT_IN
            - EXACT_OUT
        speed:
          type: string
          enum:
            - standard
            - fast
          description: The speed actually quoted (fast falls back to standard)
        amount:
          type: string
          description: The requested amount, echoed; /bridge/build re-quotes with it
        amountIn:
          type: string
          example: '10000000'
          description: Source units sent (a Stellar amount floored to 6 decimals)
        amountOut:
          type: string
          example: '99998700'
          description: Destination units, the guaranteed minimum received
        decimalsIn:
          type: number
          example: 6
        decimalsOut:
          type: number
          example: 7
        maxFee:
          type: string
          description: 'USDC: the burn maxFee cap, source units'
        fees:
          type: array
          items:
            $ref: '#/components/schemas/BridgeFee'
        nativeFee:
          description: 'USDT: LayerZero fee in the source native token'
          allOf:
            - $ref: '#/components/schemas/BridgeNativeFee'
        limits:
          $ref: '#/components/schemas/BridgeLimits'
        recipient:
          $ref: '#/components/schemas/BridgeRecipientCheck'
        claimRequired:
          type: boolean
          description: 'USDC into Stellar: someone must submit mint_and_forward on Stellar'
        expiresAt:
          type: string
          example: '2026-11-27T12:00:30.000Z'
      required:
        - asset
        - sourceChain
        - destinationChain
        - tradeType
        - speed
        - amount
        - amountIn
        - amountOut
        - decimalsIn
        - decimalsOut
        - fees
        - limits
        - recipient
        - claimRequired
        - expiresAt
    BridgeFee:
      type: object
      properties:
        type:
          type: string
          enum:
            - cctp_protocol
            - cctp_forward
            - oft_protocol
            - layerzero_messaging
        amount:
          type: string
          example: '1300'
          description: Smallest units of `token`
        token:
          type: string
          example: USDC
        decimals:
          type: number
          example: 6
        bps:
          type: number
          example: 1.3
          description: Basis points of the amount; Circle quotes fractions
        paidSeparately:
          type: boolean
          description: Paid on top of the amount, in the native token (not taken from it)
      required:
        - type
        - amount
        - token
        - decimals
    BridgeNativeFee:
      type: object
      properties:
        amount:
          type: string
          example: '531234'
          description: Quoted messaging fee, smallest native units
        token:
          type: string
          example: XLM
        decimals:
          type: number
          example: 7
      required:
        - amount
        - token
        - decimals
    BridgeLimits:
      type: object
      properties:
        minAmountIn:
          type: string
          description: Source units
        maxAmountIn:
          type: string
          description: Source units
    BridgeRecipientCheck:
      type: object
      properties:
        checked:
          type: boolean
          description: Whether a recipient was given and checked
        ready:
          type: boolean
          nullable: true
          description: Whether the recipient can receive now; null when not checked
        reason:
          type: string
      required:
        - checked
        - ready
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````

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