Get a quote for a token transfer

This endpoint is an alternative to the v1/quote endpoint, taking a toAmount value rather than fromAmount. This endpoint will calculate an appropriate fromAmount based on the specified toAmount, and use this value to generate the quote data. This endpoint can be used to request a quote for a transfer of one token to another, cross chain or not. The endpoint returns a Step object which contains information about the estimated result as well as a transactionRequest which can directly be sent to your wallet. The estimated result can be found inside the estimate, containing the estimated required fromAmount of the sending Token to meet the toAmountMin of the receiving token, which is the guaranteed minimum value that the transfer will yield including slippage. If you want to learn more about how to use this endpoint please have a look at our guide.

get/v1/quote/toAmount

Request

Query parameters

fromChainstring required

The sending chain. Can be the chain id or chain key

toChainstring required

The receiving chain. Can be the chain id or chain key

fromTokenstring required

The token that should be transferred. Can be the address or the symbol

toTokenstring required

The token that should be transferred to. Can be the address or the symbol

fromAddressstring required

The sending wallet address

toAddressstring

The receiving wallet address. If none is provided, the fromAddress will be used

toAmountstring required

The amount that will be received including all decimals (e.g. 1000000 for 1 USDC (6 decimals))

order'FASTEST' | 'CHEAPEST'

Which kind of route should be preferred FASTEST: This sorting criterion prioritizes routes with the shortest estimated execution time. Users who value speed and want their transactions to be completed as quickly as possible should choose the fastest routes. CHEAPEST: This criterion focuses on minimizing the cost of the transaction, whether in token amount or USD amount (USD amount minus gas cost). Users looking for the most economical option should choose the cheapest routes.

slippagenumber

The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.

integratorstring

A string containing tracking information about the integrator of the API

feenumber

The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount should be less than 100%.

percentagenumber double required

Fraction of the source token's fromAmount to transfer to the receiver (on Solana swap-and-bridge routes, use the swap output in the intermediate token instead). Must be greater than 0 and strictly less than 0.5 per entry; the total of all distributionFees percentages plus the integrator fee must remain strictly less than 1.

receiverstring required

Recipient address in the form of the source chain: 20-byte 0x-prefixed hex on EVM/Tron (all-lowercase or a valid EIP-55 checksum), base58 public key on Solana. A receiver whose form does not match the source chain is rejected.

Optional array of partner-specified fee distributions. Each entry transfers its percentage of the source fromAmount to the receiver address in parallel with the integrator fee and any intermediary carve-out. On GET quote endpoints, encode entries with indexed query keys (distributionFees[0][receiver], distributionFees[0][percentage]); a JSON string in a single query parameter is rejected with a validation error. OpenAPI 3.0 does not define serialization for nested arrays of objects, so generated clients and API consoles must construct these indexed keys explicitly instead of using the default query serialization. On EVM and Tron this requires FeeForwarder on the source chain (legacy FeeCollector chains are rejected); on Solana each receiver is paid with its own transfer instruction and at most 2 entries are accepted. The receiver form must match the source chain: 0x-prefixed hex on EVM/Tron, base58 on Solana. Limits: 1..10 entries, each percentage in (0, 0.5); total of all distribution percentages plus the integrator fee must be strictly less than 1. Receivers are sanctions-screened at transaction-build time. On Solana swap-and-bridge routes the percentages apply to the swap output in the intermediate token.

referrerstring

A string containing tracking information about the referrer of the integrator

allowBridgesQuoteBridgesEnum[]

List of bridges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

allowExchangesQuoteExchangesEnum[]

List of exchanges that are allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

denyBridgesQuoteBridgesEnum[]

List of bridges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

denyExchangesQuoteExchangesEnum[]

List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

preferBridgesQuoteBridgesEnum[]

List of bridges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

preferExchangesQuoteExchangesEnum[]

List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the /v1/tools endpoint. Also values all, none, default and [] are acceptable and mean all tools of the current type (all), no tools (for none and [] cases) and default tool's settings on the current stage.

allowDestinationCallboolean

Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is true.

maxPriceImpactnumber

The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.

swapStepTimingStrategiesstring[]

Timing setting to wait for a certain amount of swap rates. In the format minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}. Please check docs.li.fi for more details.

[
  "minWaitTime-600-4-300"
]
routeTimingStrategiesstring[]

Timing setting to wait for a certain amount of routes to be generated before chosing the best one. In the format minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}. Please check docs.li.fi for more details.

[
  "minWaitTime-600-4-300"
]
svmMaxSupportedTransactionVersion0 | 1 nullable

Maximum Solana transaction version the client can sign. Defaults to 0; omission or null uses v0. Set to 1 to allow V1 where enabled for the environment. Jito requests always use v0. Size overflow may fall back to v0. Read transactionRequest.svmTransactionVersion for the version actually built. Ignored for source chains other than Solana.

svmPriorityFeeLevel'NORMAL' | 'FAST' | 'ULTRA'

Priority fee level for Solana Virtual Machine (SVM) transactions.

Headers

x-lifi-api-keystring

Authentication header, register in the LI.FI Partner Portal (https://portal.li.fi/ ) to get your API Key.

Response

The step populated with the transaction data

idstring required

Unique identifier of the step

type'swap' | 'cross' | 'lifi' | 'protocol' required

The type of the step. swap executes a DEX swap on a single chain, cross bridges assets between chains, lifi runs LiFi's internal multi-action logic, and protocol represents protocol-level actions such as fee collection or vault interactions executed inside LiFi managed contracts.

toolstring required

The tool used for this step. E.g. relay

integratorstring

A string containing tracking information about the integrator of the API

referrerstring

A string containing tracking information about the referrer of the integrator

executionunknown

Example response

{
  "id": "0x48f0a2f93b0d0a9dab992d07c46bca38516c945101e8f8e08ca42af05b9e6aa9",
  "type": "cross",
  "tool": "relay",
  "action": {
    "fromChainId": 100,
    "toChainId": 137,
    "fromToken": {
      "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
      "symbol": "MIVA",
      "decimals": 18,
      "chainId": 100,
      "name": "Minerva Wallet SuperToken",
      "coinKey": "MIVA",
      "priceUSD": "0.04547537276751318",
      "logoURI": ""
    },
    "toToken": {
      "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",
      "symbol": "MIVA",
      "decimals": 18,
      "chainId": 137,
      "name": "Minerva Wallet SuperToken",
      "coinKey": "MIVA",
      "priceUSD": "0",
      "logoURI": ""
    },
    "fromAmount": "1000000000000000000",
    "slippage": 0.003
  },
  "estimate": {
    "fromAmount": "1000000000000000000",
    "toAmount": "999500000000000000",
    "toAmountMin": "999500000000000000",
    "approvalAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",
    "feeCosts": [
      {
        "name": "Gas Fee",
        "description": "Covers gas expense for sending funds to user on receiving chain.",
        "percentage": "0",
        "token": {
          "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
          "symbol": "MIVA",
          "decimals": 18,
          "chainId": 100,
          "name": "Minerva Wallet SuperToken",
          "coinKey": "MIVA",
          "priceUSD": "0.04547537276751318",
          "logoURI": ""
        },
        "amount": "0",
        "amountUSD": "0.00",
        "included": true
      },
      {
        "name": "Relay Fee",
        "description": "Covers gas expense for claiming user funds on receiving chain.",
        "percentage": "0",
        "token": {
          "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
          "symbol": "MIVA",
          "decimals": 18,
          "chainId": 100,
          "name": "Minerva Wallet SuperToken",
          "coinKey": "MIVA",
          "priceUSD": "0.04547537276751318",
          "logoURI": ""
        },
        "amount": "0",
        "amountUSD": "0.00",
        "included": true
      },
      {
        "name": "Router Fee",
        "description": "Router service fee.",
        "percentage": "0.0005",
        "token": {
          "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
          "symbol": "MIVA",
          "decimals": 18,
          "chainId": 100,
          "name": "Minerva Wallet SuperToken",
          "coinKey": "MIVA",
          "priceUSD": "0.04547537276751318",
          "logoURI": ""
        },
        "amount": "500000000000000",
        "amountUSD": "0.00",
        "included": true
      }
    ],
    "gasCosts": [
      {
        "type": "SEND",
        "price": "1260000000",
        "estimate": "140000",
        "limit": "175000",
        "amount": "176400000000000",
        "amountUSD": "0.00",
        "token": {
          "address": "0x0000000000000000000000000000000000000000",
          "symbol": "xDai",
          "decimals": 18,
          "chainId": 100,
          "name": "xDai",
          "coinKey": "xDai",
          "priceUSD": "1",
          "logoURI": "https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png"
        }
      }
    ],
    "data": {
      "bid": {
        "user": "0x53F68B2186E4a4aB4dD976eD32de68db45BA360b",
        "router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB",
        "initiator": "0x53F68B2186E4a4aB4dD976eD32de68db45BA360b",
        "sendingChainId": 100,
        "sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
        "amount": "1000000000000000000",
        "receivingChainId": 137,
        "receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387",
        "amountReceived": "999500000000000000",
        "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",
        "transactionId": "0x48f0a2f93b0d0a9dab992d07c46bca38516c945101e8f8e08ca42af05b9e6aa9",
        "expiry": 1643364189,
        "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",
        "callTo": "0x0000000000000000000000000000000000000000",
        "encryptedCallData": "0x",
        "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",
        "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113",
        "bidExpiry": 1643105290
      },
      "gasFeeInReceivingToken": "0",
      "totalFee": "500000000000000",
      "metaTxRelayerFee": "0",
      "routerFee": "500000000000000"
    }
  },
  "integrator": "fee-demo"
}

Changes

No recorded changes to this operation across all 1 revision of this API.