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

# Get a Li.Fi swap/bridge quote

> Retrieves a quote for a cross-chain or same-chain swap via Li.Fi,
including the transaction request to execute.




## OpenAPI

````yaml /openapi/client-api.yaml post /clients/me/integrations/lifi/quote
openapi: 3.1.0
info:
  title: Portal Client API
  version: '3.0'
  description: >
    The Portal Client API provides endpoints for managing wallets, building
    transactions,

    and interacting with blockchain networks. All endpoints require
    authentication via a

    Client API Key or Client Session Token (CST) passed as a Bearer token.


    ## Base URL

    `https://api.portalhq.io/api/v3`


    ## Authentication

    Include your Client API Key or Client Session Token as a Bearer token in the

    `Authorization` header of every request.


    ## Chain ID Format

    Chain parameters use either friendly names (e.g. `ethereum`, `solana`) or
    CAIP-2 format

    (e.g. `eip155:1`, `solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp`). When using
    CAIP-2 format

    in URLs, ensure the colon is URI-encoded (`%3A`).
servers:
  - url: https://api.portalhq.io/api/v3
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Clients
    description: Core client management endpoints
  - name: Wallet
    description: >-
      Read wallet state — balances, NFTs, transaction history, capabilities, and
      transaction details
  - name: Transactions
    description: Build, broadcast, and evaluate blockchain transactions
  - name: Funding
    description: Fund wallets with testnet tokens
  - name: Wallet Shares
    description: Manage signing and backup share pairs
  - name: Delegations
    description: Manage token approvals, revocations, and delegated transfers
  - name: Session Keys
    description: Manage EIP-7702 session keys for smart accounts
  - name: 0x
    description: Token swap endpoints powered by the 0x protocol
  - name: Yield.xyz
    description: Yield opportunities and staking actions powered by Yield.xyz
  - name: Yield.xyz Borrow
    description: >-
      Supply collateral, borrow, repay and withdraw from lending markets (Aave
      V3, Morpho Blue, SparkLend, Lista) powered by Yield.xyz Borrow
  - name: Li.Fi
    description: Cross-chain swaps and bridging powered by Li.Fi
  - name: Blockaid
    description: Transaction and address security scanning powered by Blockaid
  - name: Hypernative
    description: >-
      Transaction, address, token, and NFT security scanning powered by
      Hypernative
  - name: Noah
    description: KYC onboarding, payins, and payouts powered by Noah
  - name: Meld
    description: Buy and sell crypto with fiat through aggregated providers powered by Meld
  - name: Due
    description: Payins, payouts, virtual accounts, and FX powered by Due
  - name: EIP-7702
    description: EIP-7702 account type detection and authorization management
  - name: Deprecated
    description: >-
      Legacy endpoints scheduled for removal. Use the newer equivalents listed
      in each endpoint's description.
paths:
  /clients/me/integrations/lifi/quote:
    post:
      tags:
        - Li.Fi
      summary: Get a Li.Fi swap/bridge quote
      description: |
        Retrieves a quote for a cross-chain or same-chain swap via Li.Fi,
        including the transaction request to execute.
      operationId: getLifiQuote
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LifiQuoteRequest'
      responses:
        '200':
          description: Quote retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LifiQuoteResponse'
              example:
                data:
                  rawResponse:
                    type: lifi
                    id: 1a37d20d-c7c2-4db1-a4b5-96b7f1e7d99b:0
                    tool: relay
                    integrator: YOUR_INTEGRATOR_ID
                    action:
                      fromChainId: eip155:8453
                      toChainId: eip155:42161
                      fromAddress: '0x3fa7bc5cf02f07ed174d124a72fcf8d5276df546'
                      toAddress: '0x3fa7bc5cf02f07ed174d124a72fcf8d5276df546'
                      slippage: 0.001
                    estimate:
                      fromAmount: '100000'
                      toAmount: '98800'
                      toAmountMin: '98500'
                      executionDuration: 13
                      approvalAddress: '0x026F252016A7C47CDEf1F05a3Fc9E20C92a49C37'
                      feeCosts:
                        - name: LIFI Fixed Fee
                          amount: '750'
                          percentage: '0.0075'
                          included: true
                          feeSplit:
                            lifiFee: '250'
                            integratorFee: '500'
                            recipients:
                              - name: lifi
                                type: FIXED
                                fee: '250'
                              - name: YOUR_INTEGRATOR_ID
                                type: FIXED
                                fee: '500'
                      gasCosts:
                        - type: SEND
                          estimate: '583000'
                          amount: '84535000000000000'
                          amountUSD: '0.0018'
                    transactionRequest:
                      from: '0x3fa7bc5cf02f07ed174d124a72fcf8d5276df546'
                      to: '0x026F252016A7C47CDEf1F05a3Fc9E20C92a49C37'
                      value: '0x0'
                      data: 0x4c279d6b...
                      chainId: eip155:8453
                      gasPrice: '0x21c2ac6a00'
                      gasLimit: '0x1ad2cc'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    LifiQuoteRequest:
      type: object
      required:
        - fromChain
        - toChain
        - fromToken
        - toToken
        - fromAmount
        - fromAddress
      properties:
        fromChain:
          type: string
          description: Source chain ID in CAIP-2 format (e.g. `eip155:1`).
        toChain:
          type: string
          description: Destination chain ID in CAIP-2 format (e.g. `eip155:137`).
        fromToken:
          type: string
          description: Source token address or symbol.
        toToken:
          type: string
          description: Destination token address or symbol.
        fromAmount:
          type: string
          description: Amount to swap in the smallest unit of the source token.
        fromAddress:
          type: string
          description: Sender address. Must be a valid address for the source chain.
        toAddress:
          type: string
          description: Recipient address. Defaults to `fromAddress` when omitted.
        fromAmountForGas:
          type: string
          description: >-
            Amount of the source token to swap into destination-chain gas before
            bridging.
        integrator:
          type: string
          description: >-
            Your LI.FI integrator ID, registered in the [LI.FI
            Portal](https://portal.li.fi/). Required to collect integrator fees.
            When omitted, Portal sends its own default integrator and your fee
            configuration does not apply.
        fee:
          type: number
          description: >-
            Integrator fee as a decimal (e.g. `0.005` for 0.5%). Requires
            `integrator`. LI.FI pays collected fees to the receiver wallets
            configured for your integrator ID in the LI.FI Portal, and adds its
            own platform fee on top. The response shows the split in
            `estimate.feeCosts[].feeSplit`.
        maxPriceImpact:
          type: number
          description: Maximum acceptable price impact as a decimal.
        order:
          type: string
          enum:
            - RECOMMENDED
            - FASTEST
            - CHEAPEST
          description: Route ordering preference.
        slippage:
          type: number
          description: Maximum slippage as a decimal (e.g. `0.01` for 1%).
        referrer:
          type: string
          description: >-
            Optional tracking string passed through to LI.FI. Does not affect
            fee collection or payout.
        allowBridges:
          type: array
          items:
            type: string
          description: Bridges to include.
        denyBridges:
          type: array
          items:
            type: string
          description: Bridges to exclude.
        preferBridges:
          type: array
          items:
            type: string
          description: Bridges to prefer when ranking routes.
        allowExchanges:
          type: array
          items:
            type: string
          description: >-
            Exchanges to include (allowlist). Restricting exchanges makes
            routing more predictable. On Solana it helps avoid intermittent
            `ComputationalBudgetExceeded` failures from heavier multi-hop
            routes, for example limiting to lighter routes like `jupiter` or
            `fly` for stablecoin swaps.
        denyExchanges:
          type: array
          items:
            type: string
          description: >-
            Exchanges to exclude (blocklist). On Solana, useful to block heavier
            multi-hop routes that can fail with `ComputationalBudgetExceeded`.
        preferExchanges:
          type: array
          items:
            type: string
          description: Exchanges to prefer when ranking routes.
        svmSponsor:
          type: string
          description: >-
            Solana (SVM) only. Public key used as the transaction fee payer and
            the funder for in-route account creation (e.g. the intermediate WSOL
            account), so a wallet holding no SOL does not fail on rent. When
            omitted, Portal fills it with the environment's Solana gas sponsor
            (if enabled) for Solana source chains. Must be a valid Solana
            address; invalid values fall back to the environment gas sponsor.
    LifiQuoteResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            rawResponse:
              type: object
              description: >-
                Li.Fi quote response with route, estimate, and transaction
                request.
              additionalProperties: true
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message describing what went wrong
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >
        Client API Key or Client Session Token (CST). Pass as a Bearer token in
        the

        Authorization header.

````