LI.FI — Get a quote for a token transfer

Retrieve a quote for a token transfer with the LI.FI API. Supply a from chain and a to chain. Sample fields include addresses and symbols. Use it for on-chain or crypto market research. The GET request schema also lists fromChain, toChain, fromToken. Use the response in a DeFi workflow for the selected protocol, and compare the request and response with the provider example.

Selected price
$0 / callPublished pricing
Sellers / implementations
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...

Run sends a real API request. Charges follow the published API contract.

Request parameters
The sending chain. Can be the chain id or chain key
The receiving chain. Can be the chain id or chain key
The token that should be transferred. Can be the address or the symbol
The token that should be transferred to. Can be the address or the symbol
The sending wallet address
The amount that will be received including all decimals (e.g. 1000000 for 1 USDC (6 decimals))
Optional parameters (19)
The receiving wallet address. If none is provided, the fromAddress will be used
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.
The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.
A string containing tracking information about the integrator of the API
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%.
A string containing tracking information about the referrer of the integrator
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.
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.
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.
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.
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.
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.
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`.
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%.
Timing setting to wait for a certain amount of swap rates. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.
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](https://docs.li.fi) for more details.
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.
Priority fee level for Solana Virtual Machine (SVM) transactions.
Skips the EVM step simulation of the generated transaction. Honoured only for integrators configured by LI.FI; for every other caller it is accepted for backward compatibility and ignored (the transaction is simulated as usual). When honoured, the gas limit comes from the tool estimate, a transaction that would revert is not rejected, and the step carries `stepSimulation.status: not-attempted` with `disabledReason: skip_requested`.

Sample response

{
  "action": {
    "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "fromAmount": "100310989",
    "fromChainId": 1,
    "fromToken": {
      "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "chainId": 1,
      "coinKey": "USDC",
      "decimals": 6,
      "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
      "name": "USD Coin",
      "priceUSD": "1.0002350525",
      "symbol": "USDC",
      "tags": [],
      "verificationStatus": "verified",
      "verificationStatusBreakdown": []
    },
    "slippage": 0.010715365645379251,
    "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "toChainId": 10,
    "toToken": {
      "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
      "chainId": 10,
      "coinKey": "USDC",
      "decimals": 6,
      "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
      "name": "USD Coin",
      "priceUSD": "1.0008373187",
      "symbol": "USDC",
      "tags": [],
      "verificationStatus": "verified",
      "verificationStatusBreakdown": []
    }
  },
  "estimate": {
    "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
    "executionDuration": 2,
    "feeCosts": [
      {}
    ],
    "fromAmount": "100310989",
    "fromAmountUSD": "100.3346",
    "gasCosts": [
      {}
    ],
    "toAmount": "100049911",
    "toAmountMin": "100049911",
    "toAmountUSD": "100.1337",
    "tool": "across"
  },
  "id": "8f4d6943-6df2-43bc-93bf-2b06ef7ee779:0",
  "includedSteps": [
    {
      "action": {},
      "estimate": {},
      "id": "9df06ada-fb31-4d70-b480-afe0f4196d1d",
      "tool": "feeCollection",
      "toolDetails": {},
      "type": "protocol"
    }
  ],
  "integrator": "lifi-api",
  "recommendedSlippage": 0.01101256322858362,
  "stepSimulation": {
    "gasSource": "simulation",
    "status": "success"
  },
  "tool": "across",
  "toolDetails": {
    "key": "across",
    "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg",
    "name": "AcrossV4"
  },
  "transactionId": "0x9047983708275cf4eeab0fc2bb9347c7329b77500a59078f02e7fea6b0ec88e6",
  "transactionRequest": {
    "chainId": 1,
    "data": "0x1794958f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000",
    "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
    "gasLimit": "0x425e3",
    "gasPrice": "0x2d4a467",
    "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
    "value": "0x0"
  },
  "type": "lifi"
}

Response result

Response structure

Inferred from examples
  • actionobject
    • fromAddressstring
    • fromAmountstring
    • fromChainIdinteger
    • fromTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsunknown[]
      • verificationStatusstring
      • verificationStatusBreakdownunknown[]
    • slippagenumber
    • toAddressstring
    • toChainIdinteger
    • toTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsunknown[]
      • verificationStatusstring
      • verificationStatusBreakdownunknown[]
  • estimateobject
    • approvalAddressstring
    • executionDurationinteger
    • feeCostsobject[]
    • fromAmountstring
    • fromAmountUSDstring
    • gasCostsobject[]
    • toAmountstring
    • toAmountMinstring
    • toAmountUSDstring
    • toolstring
  • idstring
  • includedStepsobject[]
    • actionobject
    • estimateobject
    • idstring
    • toolstring
    • toolDetailsobject
    • typestring
  • integratorstring
  • recommendedSlippagenumber
  • stepSimulationobject
    • gasSourcestring
    • statusstring
  • toolstring
  • toolDetailsobject
    • keystring
    • logoURIstring
    • namestring
  • transactionIdstring
  • transactionRequestobject
    • chainIdinteger
    • datastring
    • fromstring
    • gasLimitstring
    • gasPricestring
    • tostring
    • valuestring
  • typestring

Common questions

Do I need a separate key for every provider?

Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.

Are these providers interchangeable?

No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.

How is this API billed?

API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.

Where do the price and contract come from?

The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.

How do OpenAny Balance and x402 differ?

OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.

Does Playground send a paid request?

Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.

Use LI.FI — Get a quote for a token transfer with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.