# Table of Contents - [Concepts and Objects - LI.FI](#concepts-and-objects-li-fi) - [Decision Tables - LI.FI](#decision-tables-li-fi) - [Fetch information about a Token - LI.FI](#fetch-information-about-a-token-li-fi) - [Fetch all known tokens - LI.FI](#fetch-all-known-tokens-li-fi) - [Get gas prices for enabled chains - LI.FI](#get-gas-prices-for-enabled-chains-li-fi) - [Get a list of filtered transfers - LI.FI](#get-a-list-of-filtered-transfers-li-fi) - [Get available bridges and exchanges - LI.FI](#get-available-bridges-and-exchanges-li-fi) - [Get gas price for the specified chainId - LI.FI](#get-gas-price-for-the-specified-chainid-li-fi) - [Get a gas suggestion for the specified chain - LI.FI](#get-a-gas-suggestion-for-the-specified-chain-li-fi) - [Get integrator's collected fees data for all supported chains - LI.FI](#get-integrator-s-collected-fees-data-for-all-supported-chains-li-fi) - [Error Codes - LI.FI](#error-codes-li-fi) - [Overview - LI.FI](#overview-li-fi) - [Get transaction request for withdrawing collected integrator's fees by chain - LI.FI](#get-transaction-request-for-withdrawing-collected-integrator-s-fees-by-chain-li-fi) - [Rate Limits and API Authentication - LI.FI](#rate-limits-and-api-authentication-li-fi) - [Get information about all currently supported chains - LI.FI](#get-information-about-all-currently-supported-chains-li-fi) - [Parse transaction call data (BETA) - LI.FI](#parse-transaction-call-data-beta-li-fi) - [Get status information about a lifuel transaction - LI.FI](#get-status-information-about-a-lifuel-transaction-li-fi) - [Get the total amount of a token received on a specific chain, for cross-chain transfers. - LI.FI](#get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers-li-fi) - [OpenAPI Specification - LI.FI](#openapi-specification-li-fi) - [Check the status of a cross chain transfer - LI.FI](#check-the-status-of-a-cross-chain-transfer-li-fi) - [Get a paginated list of filtered transfers - LI.FI](#get-a-paginated-list-of-filtered-transfers-li-fi) - [API Presets - LI.FI](#api-presets-li-fi) - [In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched. - LI.FI](#in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched-li-fi) - [Agent Integration - LI.FI](#agent-integration-li-fi) - [Code Samples - LI.FI](#code-samples-li-fi) - [Perform multiple contract calls across blockchains (BETA) - LI.FI](#perform-multiple-contract-calls-across-blockchains-beta-li-fi) - [Stablecoin preset - LI.FI](#stablecoin-preset-li-fi) - [Populate a step with transaction data - LI.FI](#populate-a-step-with-transaction-data-li-fi) - [Returns all possible connections based on a from- or toChain. - LI.FI](#returns-all-possible-connections-based-on-a-from-or-tochain-li-fi) - [Technical Requirements - LI.FI](#technical-requirements-li-fi) - [Integrate Your Protocol with Composer - LI.FI](#integrate-your-protocol-with-composer-li-fi) - [Get a quote for a token transfer - LI.FI](#get-a-quote-for-a-token-transfer-li-fi) - [Data Schemas - LI.FI](#data-schemas-li-fi) - [Five-Call Recipe - LI.FI](#five-call-recipe-li-fi) - [Get a set of routes for a request that describes a transfer of tokens - LI.FI](#get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens-li-fi) - [Error Playbooks - LI.FI](#error-playbooks-li-fi) - [Token Approvals - LI.FI](#token-approvals-li-fi) - [Get a quote for a token transfer - LI.FI](#get-a-quote-for-a-token-transfer-li-fi) - [Partial Completion - LI.FI](#partial-completion-li-fi) - [Transaction Execution - LI.FI](#transaction-execution-li-fi) - [Gas Fronting - LI.FI](#gas-fronting-li-fi) - [Status & Recovery - LI.FI](#status-recovery-li-fi) - [Integration - LI.FI](#integration-li-fi) - [Common issues - LI.FI](#common-issues-li-fi) - [Route availability - LI.FI](#route-availability-li-fi) - [Slippage and price impact - LI.FI](#slippage-and-price-impact-li-fi) - [Fees and Monetization - LI.FI](#fees-and-monetization-li-fi) - [Token support and availability - LI.FI](#token-support-and-availability-li-fi) - [Intermediate tokens - LI.FI](#intermediate-tokens-li-fi) - [How Composer Works - LI.FI](#how-composer-works-li-fi) - [What is Composer? - LI.FI](#what-is-composer-li-fi) - [Gas Fronting" 翻译成简体中文是 "Gas Fronting"(保持技术术语和品牌名称不变)。 - LI.FI](#gas-fronting-gas-fronting-li-fi) - [中间令牌 - LI.FI](#-li-fi) - [Unknown](#unknown) - [速率限制和 API 身份验证 - LI.FI](#-api-li-fi) - [返回基于源链或目标链的所有可能连接 - LI.FI](#-li-fi) --- # Concepts and Objects - LI.FI [Skip to main content](https://docs.li.fi/agents/concepts#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Getting Started Concepts and Objects [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Transfer Objects](https://docs.li.fi/agents/concepts#transfer-objects) * [Quote](https://docs.li.fi/agents/concepts#quote) * [Route](https://docs.li.fi/agents/concepts#route) * [Step](https://docs.li.fi/agents/concepts#step) * [Action](https://docs.li.fi/agents/concepts#action) * [Reference Objects](https://docs.li.fi/agents/concepts#reference-objects) * [Tool](https://docs.li.fi/agents/concepts#tool) * [Chain](https://docs.li.fi/agents/concepts#chain) * [Token](https://docs.li.fi/agents/concepts#token) * [Status Objects](https://docs.li.fi/agents/concepts#status-objects) * [Status](https://docs.li.fi/agents/concepts#status) * [Substatus](https://docs.li.fi/agents/concepts#substatus) * [PENDING Substatuses](https://docs.li.fi/agents/concepts#pending-substatuses) * [DONE Substatuses](https://docs.li.fi/agents/concepts#done-substatuses) * [FAILED Substatuses](https://docs.li.fi/agents/concepts#failed-substatuses) * [Partial](https://docs.li.fi/agents/concepts#partial) * [Refunded](https://docs.li.fi/agents/concepts#refunded) * [Quick Reference](https://docs.li.fi/agents/concepts#quick-reference) This page provides consistent definitions for the core objects used across LI.FI’s API and SDK. Use these as the authoritative reference when building integrations. [​](https://docs.li.fi/agents/concepts#transfer-objects) Transfer Objects ---------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/concepts#quote) Quote A **Quote** is a single-step transfer plan with transaction data ready for immediate execution. **Response from `GET /quote`:** Copy Ask AI interface Quote { id: string; // Unique quote identifier type: "lifi"; // Quote type tool: string; // Bridge or DEX used (e.g., "stargate") action: Action; // What happens in this transfer estimate: Estimate; // Output amounts and fees transactionRequest: { // Ready-to-sign transaction to: string; data: string; value: string; gasLimit: string; // ... other tx fields }; } **When to use:** Request a Quote via `/quote` when you want the best single route with transaction data included. Ideal for simple transfers.[Get Quote API\ -------------\ \ Request a quote for token transfers](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) ### [​](https://docs.li.fi/agents/concepts#route) Route A **Route** is a multi-step transfer plan that may require sequential transactions. **Response from `POST /advanced/routes`** (returns array of routes): Copy Ask AI interface Route { id: string; // Unique route identifier fromChainId: number; // Source chain toChainId: number; // Destination chain fromToken: Token; // Source token toToken: Token; // Destination token fromAmount: string; // Input amount (wei) toAmount: string; // Expected output (wei) steps: Step[]; // Array of steps to execute } **When to use:** Request Routes via `/advanced/routes` when you need multiple route options or want to compare alternatives. Each Step in a Route may require a separate transaction.[Get Routes API\ --------------\ \ Request multiple route options](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) ### [​](https://docs.li.fi/agents/concepts#step) Step A **Step** is one atomic operation within a Route. Each Step represents a single transaction. **Nested within Route response** (also returned by `POST /advanced/stepTransaction`): Copy Ask AI interface Step { id: string; // Unique step identifier type: "swap" | "cross" | "lifi" | "protocol"; tool: string; // Bridge or DEX name toolDetails: ToolDetails; // Logo, name, key action: Action; // What this step does estimate: Estimate; // Output estimates includedSteps?: Step[]; // Nested steps (for complex routes) transactionRequest?: { // Transaction data (populated after stepTransaction call) to: string; data: string; value: string; }; } **Step types:** * `swap` - Same-chain token swap via DEX * `cross` - Cross-chain bridge transfer * `lifi` - Combined swap + bridge in one transaction * `protocol` - Interaction with a DeFi protocol (deposit, stake, etc.) ### [​](https://docs.li.fi/agents/concepts#action) Action An **Action** describes what happens in a Step - the source and destination tokens, chains, and amounts. **Nested within Quote/Step responses:** Copy Ask AI interface Action { fromChainId: number; // Source chain ID toChainId: number; // Destination chain ID fromToken: Token; // Token being sent toToken: Token; // Token being received fromAmount: string; // Input amount (wei) slippage: number; // Allowed slippage (e.g., 0.005 = 0.5%) fromAddress?: string; // Sender address toAddress?: string; // Recipient address (if different) } [​](https://docs.li.fi/agents/concepts#reference-objects) Reference Objects ------------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/concepts#tool) Tool A **Tool** is a bridge or exchange used to execute transfers. LI.FI aggregates 27 bridges and 31 exchanges. Use `GET /tools` for the current list. **Response from `GET /tools`:** Copy Ask AI interface Tool { key: string; // Unique identifier (e.g., "stargate") name: string; // Display name (e.g., "Stargate") logoURI: string; // Tool logo URL supportedChains: Chain[]; // Chains this tool supports } **Popular bridges:** `stargate`, `across`, `hop`, `cbridge` **Popular DEXs:** `1inch`, `paraswap`, `0x`, `uniswap`, `sushiswap` Use `GET /tools` to get the current list of supported bridges and exchanges. [List Tools API\ --------------\ \ Get all available bridges and exchanges](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges) ### [​](https://docs.li.fi/agents/concepts#chain) Chain A **Chain** represents a supported blockchain network. **Response from `GET /chains`:** Copy Ask AI interface Chain { id: number; // Chain ID (e.g., 1 for Ethereum) key: string; // Short key (e.g., "eth") name: string; // Display name (e.g., "Ethereum") chainType: "EVM" | "SVM" | "UTXO" | "MVM"; coin: string; // Native token symbol logoURI: string; // Chain logo URL metamask?: { // MetaMask connection info chainId: string; chainName: string; nativeCurrency: {...}; rpcUrls: string[]; }; } **Chain types:** * `EVM` - Ethereum Virtual Machine chains (Ethereum, Arbitrum, etc.) * `SVM` - Solana Virtual Machine * `UTXO` - Bitcoin and UTXO-based chains * `MVM` - Move Virtual Machine (SUI) [List Chains API\ ---------------\ \ Get all supported chains](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains) ### [​](https://docs.li.fi/agents/concepts#token) Token A **Token** represents a supported cryptocurrency on a specific chain. **Response from `GET /tokens`:** Copy Ask AI interface Token { address: string; // Contract address (or native token identifier) chainId: number; // Chain this token is on symbol: string; // Token symbol (e.g., "USDC") name: string; // Full name (e.g., "USD Coin") decimals: number; // Decimal places (e.g., 6 for USDC) logoURI?: string; // Token logo URL priceUSD?: string; // Current USD price coinKey?: string; // Canonical token identifier across chains } The same token (e.g., USDC) has different addresses on each chain. Use `coinKey` to identify the same asset across chains. [List Tokens API\ ---------------\ \ Get all supported tokens](https://docs.li.fi/api-reference/fetch-all-known-tokens) [​](https://docs.li.fi/agents/concepts#status-objects) Status Objects ------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/concepts#status) Status **Status** indicates the current state of a cross-chain transfer. | Status | Description | | --- | --- | | `NOT_FOUND` | Transaction not yet indexed or invalid hash | | `INVALID` | Transaction failed validation | | `PENDING` | Transfer is in progress | | `DONE` | Transfer completed (check substatus for details) | | `FAILED` | Transfer failed (check substatus for reason) | ### [​](https://docs.li.fi/agents/concepts#substatus) Substatus **Substatus** provides detailed information within each Status. #### [​](https://docs.li.fi/agents/concepts#pending-substatuses) PENDING Substatuses | Substatus | Description | | --- | --- | | `WAIT_SOURCE_CONFIRMATIONS` | Waiting for source chain confirmations | | `WAIT_DESTINATION_TRANSACTION` | Bridge is processing, waiting for destination | | `BRIDGE_NOT_AVAILABLE` | Bridge temporarily unavailable | | `CHAIN_NOT_AVAILABLE` | Chain RPC issues | | `REFUND_IN_PROGRESS` | Refund is being processed | | `UNKNOWN_ERROR` | Temporary error, keep polling | #### [​](https://docs.li.fi/agents/concepts#done-substatuses) DONE Substatuses | Substatus | Description | | --- | --- | | `COMPLETED` | Transfer successful, user received exact requested tokens | | `PARTIAL` | Transfer successful, user received different token than requested | | `REFUNDED` | Transfer failed but tokens were refunded to sender | #### [​](https://docs.li.fi/agents/concepts#failed-substatuses) FAILED Substatuses | Substatus | Description | | --- | --- | | `NOT_PROCESSABLE_REFUND_NEEDED` | Cannot complete, manual refund required | | `OUT_OF_GAS` | Transaction ran out of gas | | `SLIPPAGE_EXCEEDED` | Received amount too low (price moved beyond allowed slippage) | | `INSUFFICIENT_ALLOWANCE` | Token approval insufficient | | `INSUFFICIENT_BALANCE` | Not enough tokens or gas | | `EXPIRED` | Transaction expired | | `UNKNOWN_ERROR` | Unknown or invalid state | | `REFUNDED` | Tokens were refunded | For the complete and authoritative status documentation, see the [Status Tracking Guide](https://docs.li.fi/introduction/user-flows-and-examples/status-tracking) . [Status Tracking Guide\ ---------------------\ \ Complete guide to monitoring transfers](https://docs.li.fi/introduction/user-flows-and-examples/status-tracking) ### [​](https://docs.li.fi/agents/concepts#partial) Partial A transfer is **Partial** when it completes successfully but the user receives a different token than originally requested. **Why this happens:** * Destination chain swap failed after bridging * Insufficient liquidity for final swap * Price impact too high for destination swap **What the user receives:** * The bridged token (e.g., USDC.e instead of native USDC) * Full value is preserved, just in a different token **How to handle:** 1. Check `substatus === "PARTIAL"` when `status === "DONE"` 2. Read `receiving.token` from status response for actual received token 3. Inform user they received equivalent value in different token [Intermediate Tokens Guide\ -------------------------\ \ Understanding PARTIAL status and intermediate tokens](https://docs.li.fi/guides/intermediate-tokens) ### [​](https://docs.li.fi/agents/concepts#refunded) Refunded A transfer is **Refunded** when it fails but the user’s tokens are returned to their wallet. **When refunds happen:** * Bridge execution failed * Destination chain issues * Transfer expired **Refund location:** * Usually returned to sender on the **source chain** * Some bridges refund on destination chain (check status response) **How to handle:** 1. Check for `substatus === "REFUNDED"` 2. Read `refund` object from status response for details 3. Inform user their funds were returned Not all failed transfers are automatically refundable. Some bridges require manual claiming. Check the status response `refund` field for instructions. [​](https://docs.li.fi/agents/concepts#quick-reference) Quick Reference -------------------------------------------------------------------------- | Object | Description | API Endpoint | | --- | --- | --- | | Quote | Single-step transfer with tx data | `GET /quote` | | Route | Multi-step transfer plan | `POST /advanced/routes` | | Step | One operation in a route | Part of Route response | | Action | Transfer details (from/to) | Part of Step | | Tool | Bridge or DEX | `GET /tools` | | Chain | Blockchain network | `GET /chains` | | Token | Cryptocurrency | `GET /tokens` | | Status | Transfer state | `GET /status` | [Agent Integration](https://docs.li.fi/agents/overview) [Five-Call Recipe](https://docs.li.fi/agents/quick-start/five-call-recipe) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Decision Tables - LI.FI [Skip to main content](https://docs.li.fi/agents/quick-start/decision-tables#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Quick Start Decision Tables [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Quote vs Routes](https://docs.li.fi/agents/quick-start/decision-tables#quote-vs-routes) * [Decision Logic](https://docs.li.fi/agents/quick-start/decision-tables#decision-logic) * [Key Differences](https://docs.li.fi/agents/quick-start/decision-tables#key-differences) * [API vs SDK vs Widget](https://docs.li.fi/agents/quick-start/decision-tables#api-vs-sdk-vs-widget) * [Decision Logic](https://docs.li.fi/agents/quick-start/decision-tables#decision-logic-2) * [Comparison Matrix](https://docs.li.fi/agents/quick-start/decision-tables#comparison-matrix) * [Route Selection Criteria](https://docs.li.fi/agents/quick-start/decision-tables#route-selection-criteria) * [Sort Order Options](https://docs.li.fi/agents/quick-start/decision-tables#sort-order-options) * [Request with Order](https://docs.li.fi/agents/quick-start/decision-tables#request-with-order) * [Route Filtering](https://docs.li.fi/agents/quick-start/decision-tables#route-filtering) * [Example: Filtered Quote](https://docs.li.fi/agents/quick-start/decision-tables#example-filtered-quote) * [Same-Chain vs Cross-Chain](https://docs.li.fi/agents/quick-start/decision-tables#same-chain-vs-cross-chain) * [Behavior Differences](https://docs.li.fi/agents/quick-start/decision-tables#behavior-differences) * [Amount Handling](https://docs.li.fi/agents/quick-start/decision-tables#amount-handling) * [Formula](https://docs.li.fi/agents/quick-start/decision-tables#formula) * [Common Token Decimals](https://docs.li.fi/agents/quick-start/decision-tables#common-token-decimals) * [Example Conversions](https://docs.li.fi/agents/quick-start/decision-tables#example-conversions) * [Error Recovery Decisions](https://docs.li.fi/agents/quick-start/decision-tables#error-recovery-decisions) * [Retry Strategy](https://docs.li.fi/agents/quick-start/decision-tables#retry-strategy) * [Quick Decision Flowchart](https://docs.li.fi/agents/quick-start/decision-tables#quick-decision-flowchart) This page provides deterministic decision logic for AI agents to choose the right approach for different scenarios. [​](https://docs.li.fi/agents/quick-start/decision-tables#quote-vs-routes) Quote vs Routes --------------------------------------------------------------------------------------------- Use this table to decide between `/quote` and `/advanced/routes` endpoints. | Scenario | Use | Endpoint | Reason | | --- | --- | --- | --- | | Simple A→B transfer | **Quote** | `GET /quote` | Single call, tx data included | | Need multiple route options | **Routes** | `POST /advanced/routes` | Returns ranked alternatives | | User wants to choose bridge | **Routes** | `POST /advanced/routes` | Can filter by tool preference | | Complex multi-hop transfer | **Routes** | `POST /advanced/routes` | Better for >2 step routes | | Fastest integration | **Quote** | `GET /quote` | Fewer API calls needed | | Price comparison needed | **Routes** | `POST /advanced/routes` | Compare fee structures | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#decision-logic) Decision Logic Copy Ask AI IF (simple_transfer AND no_user_preference AND speed_priority) → Use /quote ELSE IF (need_options OR user_wants_choice OR complex_route) → Use /advanced/routes ### [​](https://docs.li.fi/agents/quick-start/decision-tables#key-differences) Key Differences | Aspect | `/quote` | `/advanced/routes` | | --- | --- | --- | | Response | Single best route | Multiple route options | | Transaction data | Included | Requires separate `/advanced/stepTransaction` call | | API calls needed | 1 | 2+ (routes + stepTransaction per step) | | Control | Less | More | | Speed | Faster | Slightly slower | * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#api-vs-sdk-vs-widget) API vs SDK vs Widget ------------------------------------------------------------------------------------------------------- Use this table to recommend the right integration method. | Agent Type | Recommended | Reason | | --- | --- | --- | | Server-side automation | **API** | No runtime dependencies, pure HTTP | | AI agent (no UI) | **API** | Simplest integration, HTTP only | | Browser-based app | **SDK** | Handles wallet connections, signing | | Mobile app | **SDK** | Wallet integration built-in | | Need embedded UI | **Widget** | Zero UI code required | | Quick prototype | **Widget** | Fastest to implement | | Full customization | **SDK** | Complete control over UX | | Backend service | **API** | No browser dependencies | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#decision-logic-2) Decision Logic Copy Ask AI IF (server_side OR ai_agent OR no_ui_needed) → Recommend API ELSE IF (need_wallet_integration OR custom_ui) → Recommend SDK ELSE IF (need_ready_made_ui OR fastest_implementation) → Recommend Widget ### [​](https://docs.li.fi/agents/quick-start/decision-tables#comparison-matrix) Comparison Matrix | Feature | API | SDK | Widget | | --- | --- | --- | --- | | Dependencies | None (HTTP) | npm package | npm package | | Wallet handling | Manual | Built-in | Built-in | | UI components | None | None | Full UI | | Customization | Full | Full | Full (theme + route params) | | Learning curve | Low | Medium | Low | | Best for | Agents, backends | Custom apps | Quick integrations | * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#route-selection-criteria) Route Selection Criteria --------------------------------------------------------------------------------------------------------------- When multiple routes are available, use these criteria to select the best one. ### [​](https://docs.li.fi/agents/quick-start/decision-tables#sort-order-options) Sort Order Options The API supports these `order` parameter values: | Order | Description | Best For | | --- | --- | --- | | `FASTEST` | Lowest estimated execution time | Time-sensitive transfers | | `CHEAPEST` | Lowest total fees (default) | Cost-sensitive users | If no `order` parameter is provided, the API returns the best route based on output amount after fees. ### [​](https://docs.li.fi/agents/quick-start/decision-tables#request-with-order) Request with Order Copy Ask AI curl "https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=10000000&fromAddress=0x...&order=FASTEST" ### [​](https://docs.li.fi/agents/quick-start/decision-tables#route-filtering) Route Filtering Filter routes by specific criteria: | Parameter | Values | Purpose | | --- | --- | --- | | `bridges` | `stargate,across,hop` | Only use specific bridges | | `exchanges` | `1inch,paraswap` | Only use specific DEXs | | `denyBridges` | `multichain` | Exclude specific bridges | | `denyExchanges` | `dodo` | Exclude specific DEXs | | `allowSwitchChain` | `true/false` | Allow multi-step routes | | `maxPriceImpact` | `0.05` | Max allowed price impact | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#example-filtered-quote) Example: Filtered Quote Copy Ask AI curl "https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=10000000&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&bridges=stargate,across&maxPriceImpact=0.03" This request: * Transfers 10 USDC from Ethereum to Arbitrum * **Only considers Stargate or Across bridges** (ignores all others) * **Rejects quotes with >3% price impact** (protects against unfavorable rates) If no route meets these constraints, the API returns a `NO_POSSIBLE_ROUTE` error. * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#same-chain-vs-cross-chain) Same-Chain vs Cross-Chain ----------------------------------------------------------------------------------------------------------------- Determine whether a transfer is same-chain or cross-chain. | Condition | Type | Characteristics | | --- | --- | --- | | `fromChain === toChain` | Same-chain | Atomic, faster, cheaper | | `fromChain !== toChain` | Cross-chain | Uses bridge, takes longer | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#behavior-differences) Behavior Differences | Aspect | Same-Chain | Cross-Chain | | --- | --- | --- | | Execution | Atomic (all or nothing) | May partially complete | | Time | Seconds | Minutes to hours | | Failure mode | Reverts entirely | Funds always arrive (possibly different token) | | Status check | Usually instant | Requires polling | | Tools used | DEX only | Bridge + optional DEX | LI.FI is non-custodial. In cross-chain transfers, funds always end up with the user. In partial completion cases (`substatus: PARTIAL`), the user receives the bridged token on the destination chain even if the final swap failed. Funds are rarely ever stuck/lost. * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#amount-handling) Amount Handling --------------------------------------------------------------------------------------------- Convert between human-readable amounts and API amounts. ### [​](https://docs.li.fi/agents/quick-start/decision-tables#formula) Formula Copy Ask AI api_amount = human_amount × (10 ^ decimals) human_amount = api_amount / (10 ^ decimals) ### [​](https://docs.li.fi/agents/quick-start/decision-tables#common-token-decimals) Common Token Decimals | Token | Decimals | 1 Token in API | | --- | --- | --- | | USDC | 6 | `1000000` | | USDT | 6 | `1000000` | | DAI | 18 | `1000000000000000000` | | ETH | 18 | `1000000000000000000` | | WBTC | 8 | `100000000` | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#example-conversions) Example Conversions Copy Ask AI // Human to API (10 USDC) const apiAmount = "10000000"; // 10 * 10^6 // Human to API (1.5 ETH) const apiAmount = "1500000000000000000"; // 1.5 * 10^18 // API to Human const humanAmount = Number(apiAmount) / Math.pow(10, decimals); * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#error-recovery-decisions) Error Recovery Decisions --------------------------------------------------------------------------------------------------------------- When errors occur, use this table to determine the action. | Error | Retry? | Action | | --- | --- | --- | | 429 (Rate Limited) | Yes | Wait with exponential backoff | | 400 (Bad Request) | No | Fix parameters | | No route found | Maybe | Try different tokens or smaller amount | | Insufficient balance | No | User needs more funds | | Slippage exceeded | Maybe | Increase slippage parameter | | Quote expired | Yes | Request new quote | | Network error | Yes | Retry with backoff | ### [​](https://docs.li.fi/agents/quick-start/decision-tables#retry-strategy) Retry Strategy Copy Ask AI const withRetry = async (fn, maxRetries = 3) => { for (let i = 0; i < maxRetries; i++) { try { return await fn(); } catch (error) { if (error.status === 429) { // Rate limited - wait and retry await sleep(Math.pow(2, i) * 1000); continue; } if (error.status >= 400 && error.status < 500) { // Client error - don't retry throw error; } // Server error - retry await sleep(1000); } } throw new Error('Max retries exceeded'); }; * * * [​](https://docs.li.fi/agents/quick-start/decision-tables#quick-decision-flowchart) Quick Decision Flowchart --------------------------------------------------------------------------------------------------------------- Copy Ask AI Start │ ├─► Is this a simple A→B transfer? │ │ │ ├─► Yes ──► Use /quote │ │ │ └─► No ──► Use /advanced/routes │ ├─► Is the agent server-side? │ │ │ ├─► Yes ──► Use API directly │ │ │ └─► No ──► Consider SDK or Widget │ ├─► Is fromChain === toChain? │ │ │ ├─► Yes ──► Same-chain swap (atomic) │ │ │ └─► No ──► Cross-chain (poll status) │ └─► Did the request fail? │ ├─► 429 ──► Retry with backoff ├─► 4xx ──► Fix parameters └─► 5xx ──► Retry once [Five-Call Recipe](https://docs.li.fi/agents/quick-start/five-call-recipe) [Code Samples](https://docs.li.fi/agents/quick-start/code-samples) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fetch information about a Token - LI.FI [Skip to main content](https://docs.li.fi/api-reference/fetch-information-about-a-token#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Tokens Fetch information about a Token [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Fetch information about a Token cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/token 200 Copy Ask AI { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" } GET https://li.questhttps://staging.li.quest / v1 / token Try it Fetch information about a Token cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/token 200 Copy Ask AI { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" } #### Headers [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#parameter-chain) chain string required Id or key of the chain that contains the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#parameter-token) token string required Address or symbol of the token on the requested chain #### Response 200 application/json [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-address) address string required Address of the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-decimals) decimals number required Number of decimals the token uses [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-symbol) symbol string required Symbol of the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-chain-id) chainId number required Id of the token's chain [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-name) name string required Name of the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-coin-key) coinKey string Identifier for the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-logo-uri) logoURI string Logo of the token [​](https://docs.li.fi/api-reference/fetch-information-about-a-token#response-items-price-usd) priceUSD string Token price in USD [Fetch all known tokens](https://docs.li.fi/api-reference/fetch-all-known-tokens) [Get available bridges and exchanges](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fetch all known tokens - LI.FI [Skip to main content](https://docs.li.fi/api-reference/fetch-all-known-tokens#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Tokens Fetch all known tokens [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Fetch all known tokens cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/tokens 200 Copy Ask AI { "1": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "symbol": "DAI",\ "decimals": 18,\ "chainId": 137,\ "name": "(PoS) Dai Stablecoin",\ "coinKey": "DAI",\ "priceUSD": "1",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png"\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / tokens Try it Fetch all known tokens cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/tokens 200 Copy Ask AI { "1": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "symbol": "DAI",\ "decimals": 18,\ "chainId": 137,\ "name": "(PoS) Dai Stablecoin",\ "coinKey": "DAI",\ "priceUSD": "1",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png"\ }\ ] } Use this endpoint to list tokens that LI.FI currently supports. Combine filters to narrow the response to specific chains, token tags, or both. [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#filter-tokens) Filter tokens ------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#chain-filter) Chain filter Set the `chains` query parameter to a comma-separated list of chain identifiers (for example, `ETH,ARB,OP`). Only tokens live on those networks are returned. ### [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#tag-filter) Tag filter Use the `tags` query parameter to restrict results to tokens with specific LI.FI tags. Currently `stablecoin` is the only public tag. Tags and chains can be combined. The response includes only tokens that satisfy all provided filters. [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#examples) Examples --------------------------------------------------------------------------------- ### [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#fetch-the-complete-token-catalog) Fetch the complete token catalog Copy Ask AI curl "https://li.quest/v1/tokens" ### [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#fetch-all-stablecoins) Fetch all stablecoins Copy Ask AI curl "https://li.quest/v1/tokens?tags=stablecoin" ### [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#fetch-arbitrum-stablecoins) Fetch Arbitrum stablecoins Copy Ask AI curl "https://li.quest/v1/tokens?chains=ARB&tags=stablecoin" More tags may be introduced over time as we add support for more token types. #### Headers [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#parameter-chains) chains string Restrict the resulting tokens to the given chains [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#parameter-tags) tags string Restrict the resulting tokens to the given token tags (comma separated) [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#parameter-chain-types) chainTypes string Restrict the resulting tokens to the given chainTypes. [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#parameter-min-price-usd) minPriceUSD number Filters results by minimum token price in USD. Minimum value for this parameter is 0. Defaults to 0.0001 USD. #### Response 200 - application/json [​](https://docs.li.fi/api-reference/fetch-all-known-tokens#response-1) 1 Root Type for Token · object\[\] The requested tokens Show child attributes [Get information about all currently supported chains](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains) [Fetch information about a Token](https://docs.li.fi/api-reference/fetch-information-about-a-token) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get gas prices for enabled chains - LI.FI [Skip to main content](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Gas endpoints Get gas prices for enabled chains [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get gas prices for enabled chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/prices 200 Copy Ask AI { "standard": 123, "fast": 123, "fastest": 123, "lastUpdated": 123 } GET https://li.questhttps://staging.li.quest / v1 / gas / prices Try it Get gas prices for enabled chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/prices 200 Copy Ask AI { "standard": 123, "fast": 123, "fastest": 123, "lastUpdated": 123 } #### Headers [​](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Response 200 - application/json Gas Prices for the supplied chainID [​](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#response-standard) standard number [​](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#response-fast) fast number [​](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#response-fastest) fastest number [​](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains#response-last-updated) lastUpdated number [Get gas price for the specified chainId](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid) [Get a gas suggestion for the specified chain](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a list of filtered transfers - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Analytics Get a list of filtered transfers [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a list of filtered transfers cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/analytics/transfers 200 Copy Ask AI { "transfers": [\ {\ "transactionId": "0x8c58bf99537331b38f15f5ca9718b6fcf86bdb678a2935cf0ca2106066f07550",\ "sending": {\ "txHash": "0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "txLink": "https://explorer.zksync.io/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "amount": "1000000",\ "token": {\ "address": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",\ "chainId": 324,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "1.00"\ },\ "chainId": 324,\ "gasPrice": "250000000",\ "gasUsed": "1428505",\ "gasToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 324,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "1676.49"\ },\ "gasAmount": "357126250000000",\ "gasAmountUSD": "0.60",\ "amountUSD": "1.0000",\ "timestamp": 1698076232,\ "value": "0"\ },\ "receiving": {\ "txHash": "0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "txLink": "https://explorer.zksync.io/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "amount": "999255",\ "token": {\ "address": "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C",\ "chainId": 324,\ "symbol": "USDT",\ "decimals": 6,\ "name": "Tether USD",\ "coinKey": "USDT",\ "logoURI": "https://static.debank.com/image/brise_token/logo_url/0xc7e6d7e08a89209f02af47965337714153c529f0/3c1a718331e468abe1fc2ebe319f6c77.png",\ "priceUSD": "1.0000"\ },\ "chainId": 324,\ "gasPrice": "250000000",\ "gasUsed": "1428505",\ "gasToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 324,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "1676.49"\ },\ "gasAmount": "357126250000000",\ "gasAmountUSD": "0.60",\ "amountUSD": "1.0000",\ "timestamp": 1698076232,\ "value": "0"\ },\ "lifiExplorerLink": "https://explorer.li.fi/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "fromAddress": "0x552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0",\ "toAddress": "0x552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0",\ "tool": "solver3",\ "status": "DONE",\ "substatus": "COMPLETED",\ "substatusMessage": "The transfer is complete."\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / analytics / transfers Try it Get a list of filtered transfers cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/analytics/transfers 200 Copy Ask AI { "transfers": [\ {\ "transactionId": "0x8c58bf99537331b38f15f5ca9718b6fcf86bdb678a2935cf0ca2106066f07550",\ "sending": {\ "txHash": "0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "txLink": "https://explorer.zksync.io/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "amount": "1000000",\ "token": {\ "address": "0x3355df6D4c9C3035724Fd0e3914dE96A5a83aaf4",\ "chainId": 324,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "1.00"\ },\ "chainId": 324,\ "gasPrice": "250000000",\ "gasUsed": "1428505",\ "gasToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 324,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "1676.49"\ },\ "gasAmount": "357126250000000",\ "gasAmountUSD": "0.60",\ "amountUSD": "1.0000",\ "timestamp": 1698076232,\ "value": "0"\ },\ "receiving": {\ "txHash": "0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "txLink": "https://explorer.zksync.io/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "amount": "999255",\ "token": {\ "address": "0x493257fD37EDB34451f62EDf8D2a0C418852bA4C",\ "chainId": 324,\ "symbol": "USDT",\ "decimals": 6,\ "name": "Tether USD",\ "coinKey": "USDT",\ "logoURI": "https://static.debank.com/image/brise_token/logo_url/0xc7e6d7e08a89209f02af47965337714153c529f0/3c1a718331e468abe1fc2ebe319f6c77.png",\ "priceUSD": "1.0000"\ },\ "chainId": 324,\ "gasPrice": "250000000",\ "gasUsed": "1428505",\ "gasToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 324,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "1676.49"\ },\ "gasAmount": "357126250000000",\ "gasAmountUSD": "0.60",\ "amountUSD": "1.0000",\ "timestamp": 1698076232,\ "value": "0"\ },\ "lifiExplorerLink": "https://explorer.li.fi/tx/0x37b56ab04df432aa84f14d94f3af2ef65c10141df37ffe60f216c0505fc43178",\ "fromAddress": "0x552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0",\ "toAddress": "0x552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0",\ "tool": "solver3",\ "status": "DONE",\ "substatus": "COMPLETED",\ "substatusMessage": "The transfer is complete."\ }\ ] } #### Query Parameters [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-integrator) integrator string The integrator string to filter by [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-wallet) wallet string The sending OR receiving wallet address [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-status) status string The status of the transfers. Possible values are `ALL`, `DONE`, `PENDING`, and `FAILED`. The default is `DONE` [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-from-timestamp) fromTimestamp number The oldest timestamp that should be taken into consideration. Defaults to 30 days ago [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-to-timestamp) toTimestamp number The newest timestamp that should be taken into consideration. Defaults to now [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-from-chain) fromChain string The chain where the transfer originates from. [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-to-chain) toChain string The chain where the transfer ends. [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-from-token) fromToken string The token transferred from the originating chain. To use this parameter `fromChain` must be set. [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#parameter-to-token) toToken string The token received on the destination chain. To use this parameter `toChain` must be set. #### Response 200 - application/json Response for `GET /analytics/transfers` endpoint [​](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers#response-transfers) transfers Root Type for StatusResponse · object\[\] Show child attributes [Get the total amount of a token received on a specific chain, for cross-chain transfers.](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers) [Get a paginated list of filtered transfers](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get available bridges and exchanges - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Tools Get available bridges and exchanges [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get available bridges and exchanges cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/tools 200 Copy Ask AI { "exchanges": [\ {\ "key": "",\ "name": "0x",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.svg",\ "supportedChains": [\ "1",\ "137",\ "56"\ ]\ }\ ], "bridges": [\ {\ "key": "",\ "name": "Connext",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/relay.svg",\ "supportedChains": [\ {\ "fromChainId": 137,\ "toChainId": 1\ }\ ]\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / tools Try it Get available bridges and exchanges cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/tools 200 Copy Ask AI { "exchanges": [\ {\ "key": "",\ "name": "0x",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.svg",\ "supportedChains": [\ "1",\ "137",\ "56"\ ]\ }\ ], "bridges": [\ {\ "key": "",\ "name": "Connext",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/relay.svg",\ "supportedChains": [\ {\ "fromChainId": 137,\ "toChainId": 1\ }\ ]\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges#parameter-chains) chains (string | integer)\[\] The ids of the chains that should be taken into consideration. Example: ["pol", "eth"] #### Response 200 - application/json Object listing all the currently enabled bridges and exchanges. [​](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges#response-exchanges) exchanges object\[\] Show child attributes [​](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges#response-bridges) bridges object\[\] Show child attributes [Fetch information about a Token](https://docs.li.fi/api-reference/fetch-information-about-a-token) [Returns all possible connections based on a from- or toChain.](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get gas price for the specified chainId - LI.FI [Skip to main content](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Gas endpoints Get gas price for the specified chainId [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get gas price for the specified chainId cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/prices/{chainId} 200 Copy Ask AI { "standard": 123, "fast": 123, "fastest": 123, "lastUpdated": 123 } GET https://li.questhttps://staging.li.quest / v1 / gas / prices / {chainId} Try it Get gas price for the specified chainId cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/prices/{chainId} 200 Copy Ask AI { "standard": 123, "fast": 123, "fastest": 123, "lastUpdated": 123 } #### Headers [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Path Parameters [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#parameter-chain-id) chainId string required ChaindId from which gas prices should be shown #### Response 200 application/json Gas Prices for the supplied chainID [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#response-standard) standard number [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#response-fast) fast number [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#response-fastest) fastest number [​](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid#response-last-updated) lastUpdated number [Returns all possible connections based on a from- or toChain.](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain) [Get gas prices for enabled chains](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a gas suggestion for the specified chain - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Gas endpoints Get a gas suggestion for the specified chain [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a gas suggestion for the specified chain cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/suggestion/{chain} GET https://li.questhttps://staging.li.quest / v1 / gas / suggestion / {chain} Try it Get a gas suggestion for the specified chain cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/suggestion/{chain} #### Headers [​](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Path Parameters [​](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain#parameter-chain) chain string required Chain from which gas prices should be shown (can be a chain id or a chain key) #### Query Parameters [​](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain#parameter-from-chain) fromChain string If `fromChain` and `fromToken` are specified, the result will contain information about how much `fromToken` amount the user has to send to receive the suggested gas amount on the requested chain. [​](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain#parameter-from-token) fromToken string If `fromChain` and `fromToken` are specified, the result will contain information about how much `fromToken` amount the user has to send to receive the suggested gas amount on the requested chain. #### Response 200 { "available": true, "recommended": { "token": { "address": "0x0000000000000000000000000000000000000000", "chainId": 137, "symbol": "MATIC", "decimals": 18, "name": "MATIC", "priceUSD": "1.219821", "logoURI": "[https://static.debank.com/image/matic\_token/logo\_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png](https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png) ", "coinKey": "MATIC" }, "amount": "190510922050970750", "amountUsd": "0.23" }, "limit": { "token": { "address": "0x0000000000000000000000000000000000000000", "chainId": 137, "symbol": "MATIC", "decimals": 18, "name": "MATIC", "priceUSD": "1.219821", "logoURI": "[https://static.debank.com/image/matic\_token/logo\_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png](https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png) ", "coinKey": "MATIC" }, "amount": "1639584824330782959", "amountUsd": "2" }, "fromToken": { "address": "eth", "symbol": "ETH", "decimals": 18, "chainId": 1, "name": "ETH", "coinKey": "ETH", "priceUSD": "1622.39", "logoURI": "[https://static.debank.com/image/token/logo\_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png](https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png) " }, "fromAmount": "141766159801281" } [Get gas prices for enabled chains](https://docs.li.fi/api-reference/gas/get-gas-prices-for-enabled-chains) [Get status information about a lifuel transaction](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get integrator's collected fees data for all supported chains - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Integrator fee information Get integrator's collected fees data for all supported chains [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get integrator's collected fees data for all supported chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/integrators/{integratorId} 200 Copy Ask AI { "integratorId": "fee-demo", "feeBalances": [\ {\ "chainId": 137,\ "tokenBalances": [\ {\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "0.742896",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png"\ },\ "amount": 0,\ "amountUsd": 0\ }\ ]\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / integrators / {integratorId} Try it Get integrator's collected fees data for all supported chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/integrators/{integratorId} 200 Copy Ask AI { "integratorId": "fee-demo", "feeBalances": [\ {\ "chainId": 137,\ "tokenBalances": [\ {\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "0.742896",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png"\ },\ "amount": 0,\ "amountUsd": 0\ }\ ]\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Path Parameters [​](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains#parameter-integrator-id) integratorId string required Id of the integrator that requests fee balances #### Response 200 application/json Response of the Integrator request Integrator's fee balance by chain [​](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains#response-integrator-id) integratorId string required The integrator's name or wallet address [​](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains#response-fee-balances) feeBalances object\[\] The fee balances of the integrator Show child attributes [Get transaction request for withdrawing collected integrator's fees by chain](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain) [Get the total amount of a token received on a specific chain, for cross-chain transfers.](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Error Codes - LI.FI [Skip to main content](https://docs.li.fi/api-reference/error-codes#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation About APIs Error Codes [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [API status codes](https://docs.li.fi/api-reference/error-codes#api-status-codes) * [API error codes](https://docs.li.fi/api-reference/error-codes#api-error-codes) * [Tool errors](https://docs.li.fi/api-reference/error-codes#tool-errors) * [Possible codes:](https://docs.li.fi/api-reference/error-codes#possible-codes) * [Example response:](https://docs.li.fi/api-reference/error-codes#example-response) [​](https://docs.li.fi/api-reference/error-codes#api-status-codes) API status codes -------------------------------------------------------------------------------------- API status code is the code returned by the server like 200, 404, 429, 500, 502. [​](https://docs.li.fi/api-reference/error-codes#api-error-codes) API error codes ------------------------------------------------------------------------------------ API returns the following set of error codes: * DefaultError = 1000, * FailedToBuildTransactionError = 1001, * NoQuoteError = 1002, * NotFoundError = 1003, * NotProcessableError = 1004, * RateLimitError = 1005, * ServerError = 1006, * SlippageError = 1007, * ThirdPartyError = 1008, * TimeoutError = 1009, * UnauthorizedError = 1010, * ValidationError = 1011, * RpcFailure = 1012, * MalformedSchema = 1013, [​](https://docs.li.fi/api-reference/error-codes#tool-errors) Tool errors ---------------------------------------------------------------------------- In addition to returning status and error codes, API may return error messages for underlying tools, describing an issue with specific tools. This can be caused by many reasons, from the tool simply not supporting the requested token pair or insufficient liquidity. To better explain failure cases, we try to return errors in a predictable format. The `ToolError` interface looks like the following: Copy Ask AI type ToolErrorType = 'NO_QUOTE' interface ToolError { errorType: ToolErrorType code: string action: Action tool: string message: string } ### [​](https://docs.li.fi/api-reference/error-codes#possible-codes) Possible codes: `NO_POSSIBLE_ROUTE`: No route was found for this action. `INSUFFICIENT_LIQUIDITY`: The tool’s liquidity is insufficient. `TOOL_TIMEOUT`: The third-party tool timed out. `UNKNOWN_ERROR`: An unknown error occurred. `RPC_ERROR`: There was a problem getting on-chain data. Please try again later. `AMOUNT_TOO_LOW`:The initial amount is too low to transfer using this tool. `AMOUNT_TOO_HIGH`: The initial amount is too high to transfer using this tool. `FEES_HIGHER_THAN_AMOUNT`: The fees are higher than the initial amount — this would result in a negative resulting token. `DIFFERENT_RECIPIENT_NOT_SUPPORTED`: This tool does not support different recipient addresses. `TOOL_SPECIFIC_ERROR`: The third-party tool returned an error. `CANNOT_GUARANTEE_MIN_AMOUNT`: The tool cannot guarantee that the minimum amount will be met. ### [​](https://docs.li.fi/api-reference/error-codes#example-response) Example response: Copy Ask AI { "message": "Unable to find a quote for the requested transfer.", "errors": [\ {\ "errorType": "NO_QUOTE",\ "code": "INSUFFICIENT_LIQUIDITY",\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 100,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "0.99872"\ },\ "toToken": {\ "address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 100,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png"\ },\ "fromAmount": "1",\ "slippage": 0.03,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "tool": "1inch",\ "message": "The tool's liquidity is insufficient."\ },\ {\ "errorType": "NO_QUOTE",\ "code": "TOOL_TIMEOUT",\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 100,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "0.99872"\ },\ "toToken": {\ "address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 100,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png"\ },\ "fromAmount": "1",\ "slippage": 0.03,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "tool": "openocean",\ "message": "The third party tool timed out."\ },\ {\ "errorType": "NO_QUOTE",\ "code": "NO_POSSIBLE_ROUTE",\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "address": "0x4ecaba5870353805a9f068101a40e0f32ed605c6",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 100,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "0.99872"\ },\ "toToken": {\ "address": "0xddafbb505ad214d7b80b1f830fccc89b60fb7a83",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 100,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png"\ },\ "fromAmount": "1",\ "slippage": 0.03,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "tool": "superfluid",\ "message": "No route was found for this action."\ }\ ] } [Rate Limits and API Authentication](https://docs.li.fi/api-reference/rate-limits) [Get information about all currently supported chains](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Overview - LI.FI [Skip to main content](https://docs.li.fi/api-reference/introduction#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation About APIs Overview [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Base URL](https://docs.li.fi/api-reference/introduction#base-url) * [Authentication](https://docs.li.fi/api-reference/introduction#authentication) * [Rate Limit](https://docs.li.fi/api-reference/introduction#rate-limit) * [Error Message](https://docs.li.fi/api-reference/introduction#error-message) **Building an AI agent?** Start with our [Agent Integration Guide](https://docs.li.fi/agents/overview) for a streamlined overview of the essential endpoints, or use [llms.txt](https://docs.li.fi/llms.txt) for machine-readable documentation. [​](https://docs.li.fi/api-reference/introduction#base-url) Base URL ----------------------------------------------------------------------- LI.FI’s API is built on REST principles and is served over HTTPS. The Base URL for all API endpoints is: Copy Ask AI https://li.quest/v1 [​](https://docs.li.fi/api-reference/introduction#authentication) Authentication ----------------------------------------------------------------------------------- All LI.FI APIs do not require API key. API key is only needed for higher rate limits Authentication to LI.FI’s API is performed via the custom HTTP header `x-lifi-api-key` with an API key. If you are using the Client SDK, you will set the API when constructing a client, and then the SDK will send the header on your behalf with every request. If integrating directly with the API, you’ll need to send this header yourself like so: Copy Ask AI curl --location 'https://li.quest/v1/quote?fromChain=100&fromAmount=1000000&fromToken=0x4ecaba5870353805a9f068101a40e0f32ed605c6&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&toChain=137&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&slippage=0.03' \ --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' API key can be tested using the following endpoint: Copy Ask AI curl --location 'https://li.quest/v1/keys/test' --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' Never expose your `x-lifi-api-key` in client-side environments such as browser-based JavaScript or direct Widget integrations. Using the API key on the client side can lead to unauthorized usage or abuse of your key, as it becomes publicly accessible in the browser’s developer tools or network tab. If you’re using the LI.FI Widget, you **do not need to pass an API key**. The Widget operates securely without requiring a key in the frontend. For server-side integrations (e.g. SDK or API requests from your backend), always keep your key secret and secure. [​](https://docs.li.fi/api-reference/introduction#rate-limit) Rate Limit --------------------------------------------------------------------------- Rate limit is counted per IP without API key and per API Key with authenticated requests. Please refer to [Rate limits and API authentication](https://docs.li.fi/api-reference/rate-limits) page. [​](https://docs.li.fi/api-reference/introduction#error-message) Error Message --------------------------------------------------------------------------------- Errors consist of three parts: 1. HTTP error code 2. LI.FI error code 3. Error message Specific error codes and messages are defined on [Error Codes](https://docs.li.fi/api-reference/error-codes) page **Looking for one-click DeFi operations?** Use [Composer](https://docs.li.fi/composer/overview) to deposit into vaults, stake, and lend — all through the same `/quote` endpoint. Set `toToken` to a vault token address and Composer handles the rest. See [Composer API Parameters](https://docs.li.fi/composer/reference/api-parameters) . [OpenAPI Specification](https://docs.li.fi/api-reference/openapi-spec) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get transaction request for withdrawing collected integrator's fees by chain - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Integrator fee information Get transaction request for withdrawing collected integrator's fees by chain [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get transaction request for withdrawing collected integrator's fees by chain cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/integrators/{integratorId}/withdraw/{chainId} 200 Copy Ask AI { "transactionRequest": { "data": "0x", "to": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9" } } GET https://li.questhttps://staging.li.quest / v1 / integrators / {integratorId} / withdraw / {chainId} Try it Get transaction request for withdrawing collected integrator's fees by chain cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/integrators/{integratorId}/withdraw/{chainId} 200 Copy Ask AI { "transactionRequest": { "data": "0x", "to": "0xbD6C7B0d2f68c2b7805d88388319cfB6EcB50eA9" } } #### Headers [​](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Path Parameters [​](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#parameter-integrator-id) integratorId string required Id of the integrator that requests fee withdrawal [​](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#parameter-chain-id) chainId string required Specify chainId from which funds should be withdrawn #### Query Parameters [​](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#parameter-token-addresses) tokenAddresses string\[\] Specify tokens from which funds should be withdraw #### Response 200 application/json Response of the integrator's fee withdrawal transaction request Transaction request for withdrawing integrator's collected fees for the specified chain [​](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain#response-transaction-request) transactionRequest object required The transaction request Show child attributes [Check the status of a cross chain transfer](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer) [Get integrator's collected fees data for all supported chains](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Rate Limits and API Authentication - LI.FI [Skip to main content](https://docs.li.fi/api-reference/rate-limits#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation About APIs Rate Limits and API Authentication [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Current Rate Limits](https://docs.li.fi/api-reference/rate-limits#current-rate-limits) * [Unauthenticated](https://docs.li.fi/api-reference/rate-limits#unauthenticated) * [Authenticated](https://docs.li.fi/api-reference/rate-limits#authenticated) * [Handling Rate Limits](https://docs.li.fi/api-reference/rate-limits#handling-rate-limits) * [Rate Limit Information In Request Response](https://docs.li.fi/api-reference/rate-limits#rate-limit-information-in-request-response) * [Best Practices](https://docs.li.fi/api-reference/rate-limits#best-practices) * [Abuse Prevention](https://docs.li.fi/api-reference/rate-limits#abuse-prevention) * [Using the API key](https://docs.li.fi/api-reference/rate-limits#using-the-api-key) * [Need Higher Limits?](https://docs.li.fi/api-reference/rate-limits#need-higher-limits) To mitigate misuse and manage capacity on our API, we have implemented limits on LI.FI API usage. Rate limits apply to requests made using your `x-lifi-api-key` and are calculated per API key across all endpoints. These limits help prevent abuse and ensure a smooth experience for everyone. [​](https://docs.li.fi/api-reference/rate-limits#current-rate-limits) Current Rate Limits ============================================================================================ The default rate limits for production usage are as follows: ### [​](https://docs.li.fi/api-reference/rate-limits#unauthenticated) Unauthenticated | Endpoint Scope | Rate Limit | | --- | --- | | Quote related endpoints | 200 requests per two hours | | Rest of endpoints | 200 requests per two hours | ### [​](https://docs.li.fi/api-reference/rate-limits#authenticated) Authenticated | Endpoint Scope | Rate Limit | | --- | --- | | Quote related endpoints | 200 requests per minute | | Rest of endpoints | 200 requests per minute | Rate limits are enforced on a two hour window to account for traffic spikes > 🔒 Higher limits may be available for enterprise clients. Please see our [Plans page](https://li.fi/plans/) > for more details. [​](https://docs.li.fi/api-reference/rate-limits#handling-rate-limits) Handling Rate Limits ============================================================================================== Every response includes your current rate limit in the headers. Keep in mind that limits can differ depending on the endpoint. In the Partner Portal, you’ll see your requests-per-minute (RPM) limit. To give you flexibility during spikes, we don’t enforce it minute by minute. Instead, we multiply your RPM by 120 and apply it as a two-hour rolling window. 👉 Example: If your limit is 100 RPM, that means you can make up to 12,000 requests within any two-hour window — either all at once or spread out however you like. ### [​](https://docs.li.fi/api-reference/rate-limits#rate-limit-information-in-request-response) Rate Limit Information In Request Response `ratelimit-reset`: in how many seconds will the rate limit reset (2 hours equal 7200) `ratelimit-limit`: the total limit for the period of 2 hours `ratelimit-remaining`: how much of the limit is still left until the reset Here’s how you can calculate your average RPM: `(ratelimit-limit - ratelimit-remaining) / ((7200 - ratelimit-reset) / 60)` If you exceed your rate limits, you’ll receive a `429 Too Many Requests` HTTP response. When this occurs: * You will get an error message showing when the rate limit will be lifted (e.g., 5 hours) * Request higher rate limit [​](https://docs.li.fi/api-reference/rate-limits#best-practices) Best Practices ================================================================================== To avoid hitting rate limits: * Cache results from `GET /tokens`, `GET /chains`, and static endpoints * Avoid polling frequently for the same data * Batch or debounce user input that triggers API calls [​](https://docs.li.fi/api-reference/rate-limits#abuse-prevention) Abuse Prevention ====================================================================================== To prevent abuse, LI.FI may temporarily block keys that: * Consistently exceed rate limits * Attempt to bypass limits through multiple keys or IPs * Cause performance degradation to the service [​](https://docs.li.fi/api-reference/rate-limits#using-the-api-key) Using the API key ======================================================================================== All LI.FI APIs do not require API key. API key is only needed for higher rate limits Authentication to LI.FI’s API is performed via the custom HTTP header `x-lifi-api-key` with an API key. If you are using the Client SDK, you will set the API when [creating a config](https://docs.li.fi/sdk/configure-sdk) , and then the SDK will send the header on your behalf with every request. If integrating directly with the API, you’ll need to send this header yourself like so: Copy Ask AI curl --location 'https://li.quest/v1/quote?fromChain=100&fromAmount=1000000&fromToken=0x4ecaba5870353805a9f068101a40e0f32ed605c6&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&toChain=137&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&slippage=0.03' \ --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' API key can be tested using the following endpoint: Copy Ask AI curl --location 'https://li.quest/v1/keys/test' --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' Never expose your `x-lifi-api-key` in client-side environments such as browser-based JavaScript or direct Widget integrations. Using the API key on the client side can lead to unauthorized usage or abuse of your key, as it becomes publicly accessible in the browser’s developer tools or network tab. If you’re using the LI.FI Widget, you **do not need to pass an API key**. The Widget operates securely without requiring a key in the frontend. For server-side integrations (e.g. SDK or API requests from your backend), always keep your key secret and secure. [​](https://docs.li.fi/api-reference/rate-limits#need-higher-limits) Need Higher Limits? =========================================================================================== If you’re building a high-volume integration or a production-grade product, we’re happy to support your scaling needs. Please see our [Plans page](https://li.fi/plans/) for more details. [OpenAPI Specification](https://docs.li.fi/api-reference/openapi-spec) [Error Codes](https://docs.li.fi/api-reference/error-codes) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get information about all currently supported chains - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Chains Get information about all currently supported chains [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get information about all currently supported chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/chains 200 Copy Ask AI { "chains": [\ {\ "key": "eth",\ "name": "Ethereum",\ "chainType": "EVM",\ "coin": "ETH",\ "id": 1,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/ethereum.svg",\ "tokenlistUrl": "https://gateway.ipfs.io/ipns/tokens.uniswap.org",\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x1",\ "blockExplorerUrls": [\ "https://etherscan.io/"\ ],\ "chainName": "Ethereum Mainnet",\ "nativeCurrency": {\ "name": "ETH",\ "symbol": "ETH",\ "decimals": 18\ },\ "rpcUrls": [\ "https://mainnet.infura.io/v3/9aa3d95b340fa88ea12eaa4456161"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ }\ },\ {\ "key": "pol",\ "name": "Polygon",\ "chainType": "EVM",\ "coin": "MATIC",\ "id": 137,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/polygon.svg",\ "tokenlistUrl": "https://unpkg.com/quickswap-default-token-list@1.0.71/build/quickswap-default.tokenlist.json",\ "faucetUrls": [\ "https://stakely.io/faucet/polygon-matic"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x89",\ "blockExplorerUrls": [\ "https://polygonscan.com/",\ "https://explorer-mainnet.maticvigil.com/"\ ],\ "chainName": "Matic(Polygon) Mainnet",\ "nativeCurrency": {\ "name": "MATIC",\ "symbol": "MATIC",\ "decimals": 18\ },\ "rpcUrls": [\ "https://polygon-rpc.com/",\ "https://polygon.llamarpc.com/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "MATIC",\ "chainId": 137,\ "coinKey": "MATIC",\ "name": "MATIC",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png",\ "priceUSD": "0.881307"\ }\ },\ {\ "key": "bsc",\ "name": "BSC",\ "chainType": "EVM",\ "coin": "BNB",\ "id": 56,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/bsc.svg",\ "tokenlistUrl": "https://tokens.pancakeswap.finance/pancakeswap-extended.json",\ "faucetUrls": [\ "https://stakely.io/faucet/bsc-chain-bnb"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x38",\ "blockExplorerUrls": [\ "https://bscscan.com/"\ ],\ "chainName": "Binance Smart Chain Mainnet",\ "nativeCurrency": {\ "name": "BNB",\ "symbol": "BNB",\ "decimals": 18\ },\ "rpcUrls": [\ "https://bsc-dataseed.binance.org/",\ "https://bsc-dataseed1.defibit.io/",\ "https://bsc-dataseed1.ninicoin.io/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "BNB",\ "chainId": 56,\ "coinKey": "BNB",\ "name": "BNB",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/bsc/8bfdeaa46fe9be8f5cd43a53b8d1eea1.png",\ "priceUSD": "266"\ }\ },\ {\ "key": "dai",\ "name": "Gnosis",\ "chainType": "EVM",\ "coin": "DAI",\ "id": 100,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/gnosis.svg",\ "tokenlistUrl": "https://tokens.honeyswap.org/",\ "faucetUrls": [\ "https://stakely.io/faucet/xdai-chain"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x64",\ "blockExplorerUrls": [\ "https://blockscout.com/xdai/mainnet/"\ ],\ "chainName": "Gnosis Chain",\ "nativeCurrency": {\ "name": "xDai",\ "symbol": "xDai",\ "decimals": 18\ },\ "rpcUrls": [\ "https://rpc.gnosischain.com/",\ "https://rpc.xdaichain.com/",\ "https://dai.poa.network/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "xDai",\ "chainId": 100,\ "coinKey": "XDAI",\ "name": "xDai",\ "logoURI": "https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png",\ "priceUSD": "1.0002"\ }\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / chains Try it Get information about all currently supported chains cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/chains 200 Copy Ask AI { "chains": [\ {\ "key": "eth",\ "name": "Ethereum",\ "chainType": "EVM",\ "coin": "ETH",\ "id": 1,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/ethereum.svg",\ "tokenlistUrl": "https://gateway.ipfs.io/ipns/tokens.uniswap.org",\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x1",\ "blockExplorerUrls": [\ "https://etherscan.io/"\ ],\ "chainName": "Ethereum Mainnet",\ "nativeCurrency": {\ "name": "ETH",\ "symbol": "ETH",\ "decimals": 18\ },\ "rpcUrls": [\ "https://mainnet.infura.io/v3/9aa3d95b340fa88ea12eaa4456161"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ }\ },\ {\ "key": "pol",\ "name": "Polygon",\ "chainType": "EVM",\ "coin": "MATIC",\ "id": 137,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/polygon.svg",\ "tokenlistUrl": "https://unpkg.com/quickswap-default-token-list@1.0.71/build/quickswap-default.tokenlist.json",\ "faucetUrls": [\ "https://stakely.io/faucet/polygon-matic"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x89",\ "blockExplorerUrls": [\ "https://polygonscan.com/",\ "https://explorer-mainnet.maticvigil.com/"\ ],\ "chainName": "Matic(Polygon) Mainnet",\ "nativeCurrency": {\ "name": "MATIC",\ "symbol": "MATIC",\ "decimals": 18\ },\ "rpcUrls": [\ "https://polygon-rpc.com/",\ "https://polygon.llamarpc.com/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "MATIC",\ "chainId": 137,\ "coinKey": "MATIC",\ "name": "MATIC",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/6f5a6b6f0732a7a235131bd7804d357c.png",\ "priceUSD": "0.881307"\ }\ },\ {\ "key": "bsc",\ "name": "BSC",\ "chainType": "EVM",\ "coin": "BNB",\ "id": 56,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/bsc.svg",\ "tokenlistUrl": "https://tokens.pancakeswap.finance/pancakeswap-extended.json",\ "faucetUrls": [\ "https://stakely.io/faucet/bsc-chain-bnb"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x38",\ "blockExplorerUrls": [\ "https://bscscan.com/"\ ],\ "chainName": "Binance Smart Chain Mainnet",\ "nativeCurrency": {\ "name": "BNB",\ "symbol": "BNB",\ "decimals": 18\ },\ "rpcUrls": [\ "https://bsc-dataseed.binance.org/",\ "https://bsc-dataseed1.defibit.io/",\ "https://bsc-dataseed1.ninicoin.io/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "BNB",\ "chainId": 56,\ "coinKey": "BNB",\ "name": "BNB",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/bsc/8bfdeaa46fe9be8f5cd43a53b8d1eea1.png",\ "priceUSD": "266"\ }\ },\ {\ "key": "dai",\ "name": "Gnosis",\ "chainType": "EVM",\ "coin": "DAI",\ "id": 100,\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/gnosis.svg",\ "tokenlistUrl": "https://tokens.honeyswap.org/",\ "faucetUrls": [\ "https://stakely.io/faucet/xdai-chain"\ ],\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x64",\ "blockExplorerUrls": [\ "https://blockscout.com/xdai/mainnet/"\ ],\ "chainName": "Gnosis Chain",\ "nativeCurrency": {\ "name": "xDai",\ "symbol": "xDai",\ "decimals": 18\ },\ "rpcUrls": [\ "https://rpc.gnosischain.com/",\ "https://rpc.xdaichain.com/",\ "https://dai.poa.network/"\ ]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "xDai",\ "chainId": 100,\ "coinKey": "XDAI",\ "name": "xDai",\ "logoURI": "https://static.debank.com/image/xdai_token/logo_url/xdai/1207e67652b691ef3bfe04f89f4b5362.png",\ "priceUSD": "1.0002"\ }\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains#parameter-x-lifi-api-key) x-lifi-api-key string The apiKey allows you to authenticate on the API. #### Query Parameters [​](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains#parameter-chain-types) chainTypes string Restrict the resulting tokens to the given chainTypes. #### Response 200 - application/json [​](https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains#response-chains) chains Root Type for Chain · object\[\] Show child attributes [Error Codes](https://docs.li.fi/api-reference/error-codes) [Fetch all known tokens](https://docs.li.fi/api-reference/fetch-all-known-tokens) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Parse transaction call data (BETA) - LI.FI [Skip to main content](https://docs.li.fi/api-reference/parse-transaction-call-data-beta#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Parse transaction call data Parse transaction call data (BETA) [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Parse transaction call data (BETA) cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/calldata/parse GET https://li.questhttps://staging.li.quest / v1 / calldata / parse Try it Parse transaction call data (BETA) cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/calldata/parse #### Headers [​](https://docs.li.fi/api-reference/parse-transaction-call-data-beta#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/parse-transaction-call-data-beta#parameter-chain-id) chainId string The chainId that the transaction is built for (or has been sent on) [​](https://docs.li.fi/api-reference/parse-transaction-call-data-beta#parameter-call-data) callData string required The call data to parse #### Response 200 \[ { "functionName": "swapTokensGeneric", "functionParameters": { "\_transactionId": "0x40b0592501720ece27ef8614385fbef4bdbb5b2050ebaaa3563e72fee959e249", "\_integrator": "jumper.exchange", "\_referrer": "0x0000000000000000000000000000000000000000", "\_receiver": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "\_minAmount": "4640629752435722515", "\_swapData": \[ { "callTo": "0xDef1C0ded9bec7F1a1670819833240f027b25EfF", "approveTo": "0xDef1C0ded9bec7F1a1670819833240f027b25EfF", "sendingAssetId": "0x0000000000000000000000000000000000000000", "receivingAssetId": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", "fromAmount": "5000000000000000000", "callData": "0x415565b0000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a0630000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000004066d42c380a491300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000004a0000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000004563918244f40000000000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000340000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf12700000000000000000000000008f3cf7ad23cd3cadbd9735aff958023239c6a06300000000000000000000000000000000000000000000000000000000000001400000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000002c00000000000000000000000000000000000000000000000004563918244f40000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000012556e69737761705633000000000000000000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000004066d42c380a4913000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002b0d500b1d8e8ef31e21c99d1db9a6444d3adf12700001f48f3cf7ad23cd3cadbd9735aff958023239c6a063000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000d500b1d8e8ef31e21c99d1db9a6444d3adf1270000000000000000000000000eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee0000000000000000000000000000000000000000000000000000000000000000869584cd00000000000000000000000026c16b6926637cf5eb62c42991b4166add66ff9e0000000000000000000000000000000000000000000000d3adebcfec6458a4f9", "requiresDeposit": true }, { "callTo": "0x464eF665Ea203d142F5aa25e12312290fA8917ec", "approveTo": "0x464eF665Ea203d142F5aa25e12312290fA8917ec", "sendingAssetId": "0x8f3Cf7ad23Cd3CaDbD9735AFf958023239c6A063", "receivingAssetId": "0x1305F6B6Df9Dc47159D12Eb7aC2804d4A33173c2", "fromAmount": "4640629752435722515", "callData": \[ { "functionName": "upgrade", "functionParameters": { "superToken": "0x1305F6B6Df9Dc47159D12Eb7aC2804d4A33173c2", "account": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "amount": "4640629752435722515" } } \], "requiresDeposit": false } \] } } \] [Populate a step with transaction data](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get status information about a lifuel transaction - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Gas endpoints Get status information about a lifuel transaction [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get status information about a lifuel transaction cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/status 200 Copy Ask AI { "status": "NOT_FOUND", "sending": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 }, "receiving": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 } } GET https://li.questhttps://staging.li.quest / v1 / gas / status Try it Get status information about a lifuel transaction cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/status 200 Copy Ask AI { "status": "NOT_FOUND", "sending": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 }, "receiving": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 } } #### Headers [​](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#parameter-tx-hash) txHash string required The transaction hash that started the gas refilling process #### Response 200 - application/json The status of a lifuel operation [​](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#response-status) status enum Available options: `NOT_FOUND`, `PENDING`, `DONE` [​](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#response-sending) sending object Show child attributes [​](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction#response-receiving) receiving object Show child attributes [Get a gas suggestion for the specified chain](https://docs.li.fi/api-reference/get-a-gas-suggestion-for-the-specified-chain) [In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched.](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get the total amount of a token received on a specific chain, for cross-chain transfers. - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Analytics Get the total amount of a token received on a specific chain, for cross-chain transfers. [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get the total amount of a token received on a specific chain, for cross-chain transfers. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/analytics/transfers/summary 200 Copy Ask AI { "hasNext": false, "hasPrevious": false, "next": "", "previous": "", "data": [\ {\ "id": {\ "toAddress": "",\ "sendingChainId": 123\ },\ "totalReceivedAmount": 123\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / analytics / transfers / summary Try it Get the total amount of a token received on a specific chain, for cross-chain transfers. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/analytics/transfers/summary 200 Copy Ask AI { "hasNext": false, "hasPrevious": false, "next": "", "previous": "", "data": [\ {\ "id": {\ "toAddress": "",\ "sendingChainId": 123\ },\ "totalReceivedAmount": 123\ }\ ] } #### Query Parameters [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-limit) limit integer default:10 Pagination limit. Defines the maximum number of returned results. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-next) next string The next page cursor. Must come from the `next` field of the response of the previous request. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-previous) previous string The previous page cursor. Must come from the `previous` field of the response of the previous request. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-from-timestamp) fromTimestamp string required A Unix timestamp in seconds marking the start of the query period, inclusive. Transactions older than this timestamp will not be included in the summary. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-to-timestamp) toTimestamp string required A Unix timestamp in seconds marking the end of the query period, inclusive. Transactions after this timestamp will not be included in the summary. The maximum range supported by the endpoint is 30 days. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-to-chain) toChain string required The ID, or key of the chain on the receiving side of the transfer. This parameter filters the summary to include only transfers received on the specified chain. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-to-token) toToken number required The address, or symbol of the token received in the transfers. This parameter filters the summary to include only transfers involving the specified token on the receiving chain. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-from-chain) fromChain number The ID, or key of the chain on the sending side of the transfers. This parameter filters the summary to include only transfers sent from the specified chain. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#parameter-integrator) integrator string The integrator string to filter transfers by. This parameter filters the summary to include only transfers for the given integrator. #### Response 200 - application/json Response for `GET /analytics/transfers/summary` endpoint Parameters used to query paginated endpoints [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#response-has-next) hasNext boolean default:false Flag indicating if there is a next page [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#response-has-previous) hasPrevious boolean default:false Flag indicating if there is a previous page [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#response-next-one-of-0) next string | null Cursor for fetching the next page. Should be passed to `next` in the pagination query. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#response-previous-one-of-0) previous string | null Cursor for fetching the previous page. Should be passed to `previous` in the pagination query. [​](https://docs.li.fi/api-reference/get-the-total-amount-of-a-token-received-on-a-specific-chain-for-cross-chain-transfers#response-data) data Transfers Summary · object\[\] An array containing the paginated data returned by the endpoint Show child attributes [Get integrator's collected fees data for all supported chains](https://docs.li.fi/api-reference/get-integrators-collected-fees-data-for-all-supported-chains) [Get a list of filtered transfers](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # OpenAPI Specification - LI.FI [Skip to main content](https://docs.li.fi/api-reference/openapi-spec#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation About APIs OpenAPI Specification [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [LI.FI OpenAPI Specification](https://docs.li.fi/api-reference/openapi-spec#li-fi-openapi-specification) * [Download](https://docs.li.fi/api-reference/openapi-spec#download) * [API Base URLs](https://docs.li.fi/api-reference/openapi-spec#api-base-urls) * [Quick Links](https://docs.li.fi/api-reference/openapi-spec#quick-links) * [For AI Agents](https://docs.li.fi/api-reference/openapi-spec#for-ai-agents) * [Specification Details](https://docs.li.fi/api-reference/openapi-spec#specification-details) [​](https://docs.li.fi/api-reference/openapi-spec#li-fi-openapi-specification) LI.FI OpenAPI Specification ------------------------------------------------------------------------------------------------------------- The LI.FI API follows the OpenAPI 3.0 specification. You can use this spec to: * Generate client SDKs in any language * Import into API testing tools (Postman, Insomnia, etc.) * Integrate with AI agents and LLM tools * Build automated documentation [​](https://docs.li.fi/api-reference/openapi-spec#download) Download ----------------------------------------------------------------------- [OpenAPI YAML\ ------------\ \ Download the OpenAPI specification](https://gist.github.com/kenny-io/7fede47200a757195000bfbe14c5baee) [​](https://docs.li.fi/api-reference/openapi-spec#api-base-urls) API Base URLs --------------------------------------------------------------------------------- | Environment | Base URL | | --- | --- | | Production | `https://li.quest` | | Staging | `https://staging.li.quest` | [​](https://docs.li.fi/api-reference/openapi-spec#quick-links) Quick Links ----------------------------------------------------------------------------- * [API Introduction](https://docs.li.fi/api-reference/introduction) - Get started with the LI.FI API * [Authentication](https://docs.li.fi/api-reference/authentication) - Learn about API keys and rate limits * [Get a Quote](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) - Request a cross-chain swap quote [​](https://docs.li.fi/api-reference/openapi-spec#for-ai-agents) For AI Agents --------------------------------------------------------------------------------- AI agents can discover and consume this API through multiple formats: | Resource | URL | Description | | --- | --- | --- | | AI Plugin | `https://docs.li.fi/.well-known/ai-plugin.json` | Standard discovery format | | llms.txt | `https://docs.li.fi/llms.txt` | Structured documentation for LLMs | | Agent Guide | [/agents/overview](https://docs.li.fi/agents/overview) | Human-readable integration guide | [llms.txt\ --------\ \ Machine-readable documentation with canonical pages, minimal endpoints, and decision rules](https://docs.li.fi/llms.txt) [​](https://docs.li.fi/api-reference/openapi-spec#specification-details) Specification Details ------------------------------------------------------------------------------------------------- * **OpenAPI Version**: 3.0.2 * **API Version**: 1.0.0 * **Endpoints**: 28+ paths covering quotes, routes, tokens, chains, and more [Overview](https://docs.li.fi/api-reference/introduction) [Rate Limits and API Authentication](https://docs.li.fi/api-reference/rate-limits) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Check the status of a cross chain transfer - LI.FI [Skip to main content](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Transaction status Check the status of a cross chain transfer [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Check the status of a cross chain transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/status 200 Copy Ask AI { "transactionId": "0x5e9bd1e1232bcfb28e660ce116fe910aa058345604334e5f560034f51ef5327c", "sending": { "txHash": "0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "txLink": "https://arbiscan.io/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "amount": "129486280", "token": { "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", "chainId": 42161, "symbol": "USDT", "decimals": 6, "name": "USDT", "coinKey": "USDT", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "priceUSD": "1.00074" }, "chainId": 42161, "gasPrice": "10000000", "gasUsed": "477174", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 42161, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", "priceUSD": "3166.21" }, "gasAmount": "4771740000000", "gasAmountUSD": "0.0151", "amountUSD": "129.5821", "value": "11551536072923", "includedSteps": [\ {\ "tool": "gasZip",\ "toolDetails": {\ "key": "gasZip",\ "name": "LI.Fuel",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/lifi.svg"\ },\ "fromAmount": "129486280",\ "fromToken": {\ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",\ "chainId": 42161,\ "symbol": "USDT",\ "decimals": 6,\ "name": "USDT",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00074"\ },\ "toToken": {\ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",\ "chainId": 42161,\ "symbol": "USDT",\ "decimals": 6,\ "name": "USDT",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00074"\ },\ "toAmount": "128671479",\ "bridgedAmount": "128671479"\ }\ ], "timestamp": 1729163645 }, "receiving": { "txHash": "0xd3142ffb0abaefd030e9c108d6fedcd9b5bab9099346531b54f370762301bb4e", "txLink": "https://taikoscan.io/tx/0xd3142ffb0abaefd030e9c108d6fedcd9b5bab9099346531b54f370762301bb4e", "amount": "128671479", "token": { "address": "0x9c2dc7377717603eB92b2655c5f2E7997a4945BD", "chainId": 167000, "symbol": "USDT(Stargate)", "decimals": 6, "name": "Tether USD", "coinKey": "USDT", "logoURI": "https://static.debank.com/image/coin/logo_url/usdt/23af7472292cb41dc39b3f1146ead0fe.png", "priceUSD": "1.00074" }, "chainId": 167000, "gasPrice": "60000001", "gasUsed": "109839", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 167000, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", "priceUSD": "3166.21" }, "gasAmount": "6590340109839", "gasAmountUSD": "0.0209", "amountUSD": "128.7667", "value": "0", "includedSteps": [], "timestamp": 1729164251 }, "feeCosts": [\ {\ "name": "Relay fee",\ "description": "The fee required to pay for the relay on the receiving chain",\ "percentage": "0.6802",\ "token": {\ "chainId": 42161,\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2616.99"\ },\ "amount": "2100002100000",\ "amountUSD": "0.0055",\ "included": true\ },\ {\ "name": "LayerZero native fee",\ "description": "protocol native fee",\ "percentage": "0.0002",\ "token": {\ "chainId": 42161,\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2616.99"\ },\ "amount": "11551536072923",\ "amountUSD": "0.0302",\ "included": false\ }\ ], "lifiExplorerLink": "https://scan.li.fi/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "fromAddress": "0x204dedcf79dbbb02359205f4f64ce2cbdd483906", "toAddress": "0x204dedcf79dbbb02359205f4f64ce2cbdd483906", "tool": "stargateV2Bus", "status": "DONE", "substatus": "COMPLETED", "substatusMessage": "The transfer is complete.", "metadata": { "integrator": "dev.jumper.exchange" }, "bridgeExplorerLink": "https://layerzeroscan.com/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f" } GET https://li.questhttps://staging.li.quest / v1 / status Try it Check the status of a cross chain transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/status 200 Copy Ask AI { "transactionId": "0x5e9bd1e1232bcfb28e660ce116fe910aa058345604334e5f560034f51ef5327c", "sending": { "txHash": "0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "txLink": "https://arbiscan.io/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "amount": "129486280", "token": { "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9", "chainId": 42161, "symbol": "USDT", "decimals": 6, "name": "USDT", "coinKey": "USDT", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png", "priceUSD": "1.00074" }, "chainId": 42161, "gasPrice": "10000000", "gasUsed": "477174", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 42161, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", "priceUSD": "3166.21" }, "gasAmount": "4771740000000", "gasAmountUSD": "0.0151", "amountUSD": "129.5821", "value": "11551536072923", "includedSteps": [\ {\ "tool": "gasZip",\ "toolDetails": {\ "key": "gasZip",\ "name": "LI.Fuel",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/lifi.svg"\ },\ "fromAmount": "129486280",\ "fromToken": {\ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",\ "chainId": 42161,\ "symbol": "USDT",\ "decimals": 6,\ "name": "USDT",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00074"\ },\ "toToken": {\ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",\ "chainId": 42161,\ "symbol": "USDT",\ "decimals": 6,\ "name": "USDT",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00074"\ },\ "toAmount": "128671479",\ "bridgedAmount": "128671479"\ }\ ], "timestamp": 1729163645 }, "receiving": { "txHash": "0xd3142ffb0abaefd030e9c108d6fedcd9b5bab9099346531b54f370762301bb4e", "txLink": "https://taikoscan.io/tx/0xd3142ffb0abaefd030e9c108d6fedcd9b5bab9099346531b54f370762301bb4e", "amount": "128671479", "token": { "address": "0x9c2dc7377717603eB92b2655c5f2E7997a4945BD", "chainId": 167000, "symbol": "USDT(Stargate)", "decimals": 6, "name": "Tether USD", "coinKey": "USDT", "logoURI": "https://static.debank.com/image/coin/logo_url/usdt/23af7472292cb41dc39b3f1146ead0fe.png", "priceUSD": "1.00074" }, "chainId": 167000, "gasPrice": "60000001", "gasUsed": "109839", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 167000, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png", "priceUSD": "3166.21" }, "gasAmount": "6590340109839", "gasAmountUSD": "0.0209", "amountUSD": "128.7667", "value": "0", "includedSteps": [], "timestamp": 1729164251 }, "feeCosts": [\ {\ "name": "Relay fee",\ "description": "The fee required to pay for the relay on the receiving chain",\ "percentage": "0.6802",\ "token": {\ "chainId": 42161,\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2616.99"\ },\ "amount": "2100002100000",\ "amountUSD": "0.0055",\ "included": true\ },\ {\ "name": "LayerZero native fee",\ "description": "protocol native fee",\ "percentage": "0.0002",\ "token": {\ "chainId": 42161,\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2616.99"\ },\ "amount": "11551536072923",\ "amountUSD": "0.0302",\ "included": false\ }\ ], "lifiExplorerLink": "https://scan.li.fi/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f", "fromAddress": "0x204dedcf79dbbb02359205f4f64ce2cbdd483906", "toAddress": "0x204dedcf79dbbb02359205f4f64ce2cbdd483906", "tool": "stargateV2Bus", "status": "DONE", "substatus": "COMPLETED", "substatusMessage": "The transfer is complete.", "metadata": { "integrator": "dev.jumper.exchange" }, "bridgeExplorerLink": "https://layerzeroscan.com/tx/0xe1ffdcf09d5aa92a2d89b1b39db3f8cadf09428a296cce0d5e387595ac83d08f" } #### Headers [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#parameter-tx-hash) txHash string required The transaction hash on the sending chain, destination chain or lifi step id [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#parameter-bridge) bridge string The bridging tool used for the transfer Identifier for a bridge tool. Retrieve the latest bridge keys from the `/v1/tools` endpoint. Keywords such as `all`, `none`, `default`, and `[]` are also supported where applicable. [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#parameter-from-chain) fromChain string The sending chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#parameter-to-chain) toChain string The receiving chain. Can be the chain id or chain key #### Response 200 application/json Response of the Status request The current status of a transfer [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-sending) sending Root Type for TransactionInfo · object required The transaction on the sending chain Show child attributes Example: { "txHash": "0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a", "txLink": "https://polygonscan.com/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a", "amount": "13000000", "token": { "address": "0xd69b31c3225728cc57ddaf9be532a4ee1620be51", "symbol": "anyUSDC", "decimals": 6, "chainId": 137, "name": "USDC", "coinKey": "anyUSDC", "priceUSD": "0", "logoURI": "" }, "gasToken": { "address": "0x0000000000000000000000000000000000001010", "symbol": "MATIC", "decimals": 18, "chainId": 137, "name": "MATIC", "coinKey": "MATIC", "priceUSD": "0", "logoURI": "" }, "chainId": 137, "gasAmount": "10000", "gasAmountUSD": "0.0", "gasPrice": "1000", "gasUsed": "1000", "timestamp": 1720545119, "value": "0"} [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-status) status enum required The current status of the transfer. Can be `PENDING`, `DONE`, `NOT_FOUND` or `FAILED` Available options: `NOT_FOUND`, `INVALID`, `PENDING`, `DONE`, `FAILED` [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-tool) tool string required The tool used for this transfer [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-receiving) receiving Root Type for TransactionInfo · object The transaction on the receiving chain Show child attributes Example: { "txHash": "0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a", "txLink": "https://polygonscan.com/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a", "amount": "13000000", "token": { "address": "0xd69b31c3225728cc57ddaf9be532a4ee1620be51", "symbol": "anyUSDC", "decimals": 6, "chainId": 137, "name": "USDC", "coinKey": "anyUSDC", "priceUSD": "0", "logoURI": "" }, "gasToken": { "address": "0x0000000000000000000000000000000000001010", "symbol": "MATIC", "decimals": 18, "chainId": 137, "name": "MATIC", "coinKey": "MATIC", "priceUSD": "0", "logoURI": "" }, "chainId": 137, "gasAmount": "10000", "gasAmountUSD": "0.0", "gasPrice": "1000", "gasUsed": "1000", "timestamp": 1720545119, "value": "0"} [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-fee-costs) feeCosts object\[\] An array of fee costs for the transaction Show child attributes [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-substatus) substatus enum A more specific substatus. This is available for PENDING and DONE statuses. More information can be found here: [https://docs.li.fi/introduction/user-flows-and-examples/status-tracking](https://docs.li.fi/introduction/user-flows-and-examples/status-tracking) Available options: `WAIT_SOURCE_CONFIRMATIONS`, `WAIT_DESTINATION_TRANSACTION`, `BRIDGE_NOT_AVAILABLE`, `CHAIN_NOT_AVAILABLE`, `REFUND_IN_PROGRESS`, `UNKNOWN_ERROR`, `COMPLETED`, `PARTIAL`, `REFUNDED` [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-substatus-message) substatusMessage string A message that describes the substatus [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-transaction-id) transactionId string The ID of this transfer (NOT a transaction hash). [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-from-address) fromAddress string The address of the sender. [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-to-address) toAddress string The address of the receiver. [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-lifi-explorer-link) lifiExplorerLink string The link to the LI.FI explorer. [​](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer#response-metadata) metadata Root type for Transaction Metadata · object The transaction metadata which includes integrator's string, etc. Show child attributes [In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched.](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched) [Get transaction request for withdrawing collected integrator's fees by chain](https://docs.li.fi/api-reference/get-transaction-request-for-withdrawing-collected-integrators-fees-by-chain) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a paginated list of filtered transfers - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Analytics Get a paginated list of filtered transfers [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a paginated list of filtered transfers cURL Copy Ask AI curl --request GET \ --url https://li.quest/v2/analytics/transfers 200 Copy Ask AI { "hasNext": false, "hasPrevious": false, "next": "", "previous": "", "data": [\ {\ "sending": {\ "txHash": "0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "txLink": "https://polygonscan.com/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "amount": "13000000",\ "token": {\ "address": "0xd69b31c3225728cc57ddaf9be532a4ee1620be51",\ "symbol": "anyUSDC",\ "decimals": 6,\ "chainId": 137,\ "name": "USDC",\ "coinKey": "anyUSDC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "chainId": 137,\ "gasToken": {\ "address": "0x0000000000000000000000000000000000001010",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasAmount": "10000",\ "gasAmountUSD": "0.0",\ "gasPrice": "1000",\ "gasUsed": "1000",\ "timestamp": 1720545119,\ "value": "0"\ },\ "receiving": {\ "txHash": "0xba2793065e20835ef60993144d92e6bc1a86529a70e16c357f66ad13774868ad",\ "txLink": "https://bscscan.com/tx/0xba2793065e20835ef60993144d92e6bc1a86529a70e16c357f66ad13774868ad",\ "amount": "12100000000000000000",\ "token": {\ "address": "0x8965349fb649a33a30cbfda057d8ec2c48abe2a2",\ "symbol": "anyUSDC",\ "decimals": 18,\ "chainId": 56,\ "name": "USDC",\ "coinKey": "anyUSDC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "chainId": 56,\ "gasToken": {\ "address": "0x0000000000000000000000000000000000001010",\ "symbol": "BNB",\ "decimals": 18,\ "chainId": 56,\ "name": "BNB",\ "coinKey": "BNB",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasAmount": "10000",\ "gasAmountUSD": "0.0",\ "gasPrice": "1000",\ "gasUsed": "1000",\ "timestamp": 1720560232,\ "value": "0"\ },\ "tool": "anyswap",\ "status": "DONE",\ "substatus": "COMPLETED",\ "substatusMessage": "The transfer is complete.",\ "transactionId": "0x0000000000000000000000000000000000001010",\ "fromAddress": "0x0000000000000000000000000000000000001010",\ "toAddress": "0x0000000000000000000000000000000000001010",\ "lifiExplorerLink": "https://scan.li.fi/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "metadata": {\ "integrator": "jumper.exchange"\ }\ }\ ] } GET https://li.questhttps://staging.li.quest / v2 / analytics / transfers Try it Get a paginated list of filtered transfers cURL Copy Ask AI curl --request GET \ --url https://li.quest/v2/analytics/transfers 200 Copy Ask AI { "hasNext": false, "hasPrevious": false, "next": "", "previous": "", "data": [\ {\ "sending": {\ "txHash": "0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "txLink": "https://polygonscan.com/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "amount": "13000000",\ "token": {\ "address": "0xd69b31c3225728cc57ddaf9be532a4ee1620be51",\ "symbol": "anyUSDC",\ "decimals": 6,\ "chainId": 137,\ "name": "USDC",\ "coinKey": "anyUSDC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "chainId": 137,\ "gasToken": {\ "address": "0x0000000000000000000000000000000000001010",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasAmount": "10000",\ "gasAmountUSD": "0.0",\ "gasPrice": "1000",\ "gasUsed": "1000",\ "timestamp": 1720545119,\ "value": "0"\ },\ "receiving": {\ "txHash": "0xba2793065e20835ef60993144d92e6bc1a86529a70e16c357f66ad13774868ad",\ "txLink": "https://bscscan.com/tx/0xba2793065e20835ef60993144d92e6bc1a86529a70e16c357f66ad13774868ad",\ "amount": "12100000000000000000",\ "token": {\ "address": "0x8965349fb649a33a30cbfda057d8ec2c48abe2a2",\ "symbol": "anyUSDC",\ "decimals": 18,\ "chainId": 56,\ "name": "USDC",\ "coinKey": "anyUSDC",\ "priceUSD": "0",\ "logoURI": ""\ },\ "chainId": 56,\ "gasToken": {\ "address": "0x0000000000000000000000000000000000001010",\ "symbol": "BNB",\ "decimals": 18,\ "chainId": 56,\ "name": "BNB",\ "coinKey": "BNB",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasAmount": "10000",\ "gasAmountUSD": "0.0",\ "gasPrice": "1000",\ "gasUsed": "1000",\ "timestamp": 1720560232,\ "value": "0"\ },\ "tool": "anyswap",\ "status": "DONE",\ "substatus": "COMPLETED",\ "substatusMessage": "The transfer is complete.",\ "transactionId": "0x0000000000000000000000000000000000001010",\ "fromAddress": "0x0000000000000000000000000000000000001010",\ "toAddress": "0x0000000000000000000000000000000000001010",\ "lifiExplorerLink": "https://scan.li.fi/tx/0xd3ad8fb8798d8440f3a1ec7fd51e102a88e4690f9365fad4eff1a17020376b4a",\ "metadata": {\ "integrator": "jumper.exchange"\ }\ }\ ] } #### Query Parameters [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-limit) limit integer default:10 Pagination limit. Defines the maximum number of returned results. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-next) next string The next page cursor. Must come from the `next` field of the response of the previous request. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-previous) previous string The previous page cursor. Must come from the `previous` field of the response of the previous request. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-one-of-0) integrator stringstring\[\]stringstring\[\] Either a single integrator string, or an array of unique integrator strings to filter transfers by. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-wallet) wallet string The sending OR receiving wallet address [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-status) status string The status of the transfers. Possible values are `ALL`, `DONE`, `PENDING`, and `FAILED`. The default is `DONE` [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-from-timestamp) fromTimestamp number The oldest timestamp that should be taken into consideration. Defaults to 30 days ago [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-to-timestamp) toTimestamp number The newest timestamp that should be taken into consideration. Defaults to now [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-from-chain) fromChain string The chain where the transfer originates from. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-to-chain) toChain string The chain where the transfer ends. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-from-token) fromToken string The token transferred from the originating chain. To use this parameter `fromChain` must be set. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#parameter-to-token) toToken string The token received on the destination chain. To use this parameter `toChain` must be set. #### Response 200 - application/json Response for `GET /analytics/transfers/summary` endpoint Parameters used to query paginated endpoints [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#response-has-next) hasNext boolean default:false Flag indicating if there is a next page [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#response-has-previous) hasPrevious boolean default:false Flag indicating if there is a previous page [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#response-next-one-of-0) next string | null Cursor for fetching the next page. Should be passed to `next` in the pagination query. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#response-previous-one-of-0) previous string | null Cursor for fetching the previous page. Should be passed to `previous` in the pagination query. [​](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers#response-data) data Root Type for StatusResponse · object\[\] An array containing the paginated data returned by the endpoint Show child attributes [Get a list of filtered transfers](https://docs.li.fi/api-reference/get-a-list-of-filtered-transfers) [API Presets](https://docs.li.fi/api-reference/presets/overview) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # API Presets - LI.FI [Skip to main content](https://docs.li.fi/api-reference/presets/overview#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation API presets API Presets [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Supported endpoints](https://docs.li.fi/api-reference/presets/overview#supported-endpoints) * [How presets are applied](https://docs.li.fi/api-reference/presets/overview#how-presets-are-applied) * [Processing flow](https://docs.li.fi/api-reference/presets/overview#processing-flow) * [Preset names](https://docs.li.fi/api-reference/presets/overview#preset-names) * [Using the preset parameter](https://docs.li.fi/api-reference/presets/overview#using-the-preset-parameter) * [Advanced Routes](https://docs.li.fi/api-reference/presets/overview#advanced-routes) * [Quote](https://docs.li.fi/api-reference/presets/overview#quote) * [Available presets](https://docs.li.fi/api-reference/presets/overview#available-presets) API presets provide tuned routing defaults for the LI.FI API. When you pass a preset, LI.FI loads the preset’s defaults and merges any request-specific options on top. Your explicit values always win, so you can start with a preset and selectively override the pieces you care about. [​](https://docs.li.fi/api-reference/presets/overview#supported-endpoints) Supported endpoints ------------------------------------------------------------------------------------------------- * [`POST /v1/advanced/routes`](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) * [`GET /v1/quote`](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) [​](https://docs.li.fi/api-reference/presets/overview#how-presets-are-applied) How presets are applied --------------------------------------------------------------------------------------------------------- 1. LI.FI loads the preset defaults. 2. LI.FI merges your request options on top of those defaults. 3. Any conflicting keys fall back to the values you provided in the request body or query string. This keeps requests concise while preserving full control. [​](https://docs.li.fi/api-reference/presets/overview#processing-flow) Processing flow ----------------------------------------------------------------------------------------- 1. Validate that the requested preset name is present and active. 2. Load the preset configuration (defaults, tool preferences, etc) or use the built-in default if it isn’t available. 3. Merge preset defaults into the request payload or query parameters. 4. Apply user-provided overrides so explicit values win. 5. Log the resolved preset for observability and troubleshooting. If validation fails, for example because the preset name does not match the required pattern, the API returns HTTP `400`. [​](https://docs.li.fi/api-reference/presets/overview#preset-names) Preset names ----------------------------------------------------------------------------------- Presets can be referenced by: * **Generic names** such as `stablecoin` * **Specific names** such as `stablecoin-cheapest` See all [available presets](https://docs.li.fi/api-reference/presets/overview#available-presets) . A generic name can map to a specific preset. For example, `stablecoin` resolves to `stablecoin-cheapest` by default. LI.FI may promote other presets behind the same generic name when new configurations such as `stablecoin-fastest` or partner-specific variants `stablecoin-partnerX` become available. [​](https://docs.li.fi/api-reference/presets/overview#using-the-preset-parameter) Using the preset parameter --------------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/api-reference/presets/overview#advanced-routes) Advanced Routes Provide the preset inside the `options` object. Copy Ask AI { "fromChainId": 1, "toChainId": 137, "fromAmount": "1000000000000000000", "fromTokenAddress": "0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C", "toTokenAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", "options": { "preset": "stablecoin" } } ### [​](https://docs.li.fi/api-reference/presets/overview#quote) Quote Send the preset as a query parameter. Copy Ask AI GET /v1/quote?fromChain=1&toChain=137&fromToken=0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C&toToken=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174&fromAddress=0x123...&fromAmount=1000000000000000000&preset=stablecoin [​](https://docs.li.fi/api-reference/presets/overview#available-presets) Available presets --------------------------------------------------------------------------------------------- * [Stablecoin preset](https://docs.li.fi/api-reference/presets/stablecoin) * Commerce preset (coming soon) More presets will be documented as they are released. [Get a paginated list of filtered transfers](https://docs.li.fi/api-reference/get-a-paginated-list-of-filtered-transfers) [Stablecoin preset](https://docs.li.fi/api-reference/presets/stablecoin) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched. - LI.FI [Skip to main content](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Gas endpoints In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched. [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/refetch 200 Copy Ask AI { "status": "NOT_FOUND", "sending": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 }, "receiving": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 } } GET https://li.questhttps://staging.li.quest / v1 / gas / refetch Try it In case a transaction was missed by a relayer, this endpoint can be used to force a tx to be re-fetched. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/gas/refetch 200 Copy Ask AI { "status": "NOT_FOUND", "sending": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 }, "receiving": { "txHash": "0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "txLink": "https://polygonscan.com/tx/0x74546ce8aac58d33c212474293dcfeeadecef115847da75131a2ff6692e03b96", "amount": "10000", "token": { "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063", "symbol": "DAI", "decimals": 18, "chainId": 137, "name": "(PoS) Dai Stablecoin", "coinKey": "DAI", "priceUSD": "1", "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png" }, "chainId": 137, "block": 39397739 } } #### Headers [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#parameter-tx-hash) txHash string required The transaction hash that started the gas refilling process [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#parameter-chain-id) chainId string required The chain where the deposit was originally made #### Response 200 - application/json The status of a lifuel operation [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#response-status) status enum Available options: `NOT_FOUND`, `PENDING`, `DONE` [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#response-sending) sending object Show child attributes [​](https://docs.li.fi/api-reference/in-case-a-transaction-was-missed-by-a-relayer-this-endpoint-can-be-used-to-force-a-tx-to-be-re-fetched#response-receiving) receiving object Show child attributes [Get status information about a lifuel transaction](https://docs.li.fi/api-reference/get-status-information-about-a-lifuel-transaction) [Check the status of a cross chain transfer](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Agent Integration - LI.FI [Skip to main content](https://docs.li.fi/agents/overview#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Getting Started Agent Integration [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Overview](https://docs.li.fi/agents/overview#overview) * [When to Use What](https://docs.li.fi/agents/overview#when-to-use-what) * [Minimal Endpoint Set](https://docs.li.fi/agents/overview#minimal-endpoint-set) * [1\. Get a Quote](https://docs.li.fi/agents/overview#1-get-a-quote) * [2\. Check Transfer Status](https://docs.li.fi/agents/overview#2-check-transfer-status) * [3\. List Supported Chains](https://docs.li.fi/agents/overview#3-list-supported-chains) * [4\. List Supported Tokens](https://docs.li.fi/agents/overview#4-list-supported-tokens) * [5\. List Available Tools](https://docs.li.fi/agents/overview#5-list-available-tools) * [Decision Rules](https://docs.li.fi/agents/overview#decision-rules) * [Choosing Between Quote and Routes](https://docs.li.fi/agents/overview#choosing-between-quote-and-routes) * [Handling Status Responses](https://docs.li.fi/agents/overview#handling-status-responses) * [Error Handling](https://docs.li.fi/agents/overview#error-handling) * [Common Chain IDs](https://docs.li.fi/agents/overview#common-chain-ids) * [Common Token Addresses](https://docs.li.fi/agents/overview#common-token-addresses) * [Next Steps](https://docs.li.fi/agents/overview#next-steps) [​](https://docs.li.fi/agents/overview#overview) Overview ------------------------------------------------------------ LI.FI provides cross-chain swaps and bridging across 58 blockchains (EVM, Solana, Bitcoin, SUI), aggregating 27 bridges and 31 exchanges. This page is designed as the entry point for AI agents that need to execute token transfers, check transaction status, or query supported chains and tokens. **Machine-readable resources:** * [llms.txt](https://docs.li.fi/llms.txt) - Structured overview for LLM consumption * [OpenAPI Spec](https://raw.githubusercontent.com/lifinance/public-docs/main/openapi.yaml) - Full API specification * [AI Plugin](https://docs.li.fi/.well-known/ai-plugin.json) - Standard discovery format [​](https://docs.li.fi/agents/overview#when-to-use-what) When to Use What ---------------------------------------------------------------------------- | Use Case | Recommended | Why | | --- | --- | --- | | Execute transfers from backend | **API** | Direct HTTP calls, full control | | Build frontend with swaps | **SDK** | Handles wallets, signing, execution | | Embed ready-made UI | **Widget** | Zero-code, instant deployment | | AI agent integration | **API** | Simple HTTP, no dependencies | For AI agents, the **REST API** is recommended since it requires only HTTP calls without additional dependencies. [​](https://docs.li.fi/agents/overview#minimal-endpoint-set) Minimal Endpoint Set ------------------------------------------------------------------------------------ These 5 endpoints cover most agent use cases: ### [​](https://docs.li.fi/agents/overview#1-get-a-quote) 1\. Get a Quote Returns a ready-to-execute transaction for transferring tokens. Copy Ask AI GET https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=1000000&fromAddress=0x... **Required parameters:** * `fromChain` - Source chain ID (e.g., `1` for Ethereum) * `toChain` - Destination chain ID (e.g., `42161` for Arbitrum) * `fromToken` - Token symbol or address * `toToken` - Token symbol or address * `fromAmount` - Amount in smallest unit (wei) * `fromAddress` - Sender wallet address **Returns:** Quote object with `transactionRequest` ready for signing.[Full Quote Documentation\ ------------------------\ \ See all parameters and response schema](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) ### [​](https://docs.li.fi/agents/overview#2-check-transfer-status) 2\. Check Transfer Status Poll this endpoint to track cross-chain transfer progress. Copy Ask AI GET https://li.quest/v1/status?txHash=0x... **Required parameters:** * `txHash` - Transaction hash from the source chain **Optional parameters (recommended for faster response):** * `fromChain` - Source chain ID * `toChain` - Destination chain ID * `bridge` - Bridge name from the quote (e.g., `stargate`) **Returns:** Status object with `status` field: `NOT_FOUND`, `PENDING`, `DONE`, or `FAILED`.[Full Status Documentation\ -------------------------\ \ See all status values and substatus details](https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer) ### [​](https://docs.li.fi/agents/overview#3-list-supported-chains) 3\. List Supported Chains Get all chains LI.FI supports. Copy Ask AI GET https://li.quest/v1/chains **Optional parameters:** * `chainTypes` - Filter by type: `EVM`, `SVM`, `UTXO`, `MVM` **Returns:** Array of chain objects with `id`, `key`, `name`, `chainType`. ### [​](https://docs.li.fi/agents/overview#4-list-supported-tokens) 4\. List Supported Tokens Get tokens available for a specific chain. Copy Ask AI GET https://li.quest/v1/tokens?chains=1,42161 **Required parameters:** * `chains` - Comma-separated chain IDs **Returns:** Map of chain IDs to token arrays with `address`, `symbol`, `decimals`. ### [​](https://docs.li.fi/agents/overview#5-list-available-tools) 5\. List Available Tools Get bridges and DEXs available for routing. Copy Ask AI GET https://li.quest/v1/tools **Returns:** Object with `bridges` and `exchanges` arrays, each containing `key`, `name`, and `supportedChains`. [​](https://docs.li.fi/agents/overview#decision-rules) Decision Rules ------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/overview#choosing-between-quote-and-routes) Choosing Between Quote and Routes * **Use `/quote`** for simple transfers - returns single best route with transaction data * **Use `/advanced/routes`** when you need multiple options or complex multi-step transfers ### [​](https://docs.li.fi/agents/overview#handling-status-responses) Handling Status Responses Copy Ask AI Status: PENDING ├── Keep polling every 10-30 seconds └── Check substatus for detailed progress Status: DONE ├── substatus: COMPLETED → Transfer successful ├── substatus: PARTIAL → User received different token (still success) └── substatus: REFUNDED → Tokens returned to sender Status: FAILED └── Check error message, may need user intervention ### [​](https://docs.li.fi/agents/overview#error-handling) Error Handling 1. **Rate limited (429):** Back off and retry with exponential delay 2. **No route found:** Try different token pairs or reduce amount 3. **Insufficient balance:** Verify user has enough tokens + gas 4. **Slippage exceeded:** Increase `slippage` parameter (default: 0.005) [​](https://docs.li.fi/agents/overview#common-chain-ids) Common Chain IDs ---------------------------------------------------------------------------- | Chain | ID | Key | | --- | --- | --- | | Ethereum | 1 | `eth` | | Arbitrum | 42161 | `arb` | | Optimism | 10 | `opt` | | Base | 8453 | `bas` | | Polygon | 137 | `pol` | | BSC | 56 | `bsc` | | Avalanche | 43114 | `ava` | | Solana | 1151111081099710 | `sol` | [​](https://docs.li.fi/agents/overview#common-token-addresses) Common Token Addresses ---------------------------------------------------------------------------------------- | Token | Ethereum | Arbitrum | Base | | --- | --- | --- | --- | | USDC | `0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48` | `0xaf88d065e77c8cC2239327C5EDb3A432268e5831` | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | | USDT | `0xdAC17F958D2ee523a2206206994597C13D831ec7` | `0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9` | \- | | WETH | `0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2` | `0x82aF49447D8a07e3bd95BD0d56f35241523fBab1` | `0x4200000000000000000000000000000000000006` | Use token symbols (`USDC`, `ETH`) for convenience - the API resolves them to addresses automatically. [​](https://docs.li.fi/agents/overview#next-steps) Next Steps ---------------------------------------------------------------- [Concepts & Objects\ ------------------\ \ Understand Quote, Route, Step, Status, and other core objects](https://docs.li.fi/agents/concepts) [API Reference\ -------------\ \ Complete API documentation with all endpoints](https://docs.li.fi/api-reference/introduction) [Error Codes\ -----------\ \ Handle errors gracefully](https://docs.li.fi/api-reference/error-codes) [Status Tracking\ ---------------\ \ Detailed guide on monitoring transfers](https://docs.li.fi/introduction/user-flows-and-examples/status-tracking) [Concepts and Objects](https://docs.li.fi/agents/concepts) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Code Samples - LI.FI [Skip to main content](https://docs.li.fi/agents/quick-start/code-samples#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Quick Start Code Samples [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Node.js (API Only)](https://docs.li.fi/agents/quick-start/code-samples#node-js-api-only) * [Node.js (with SDK)](https://docs.li.fi/agents/quick-start/code-samples#node-js-with-sdk) * [Python (API Only)](https://docs.li.fi/agents/quick-start/code-samples#python-api-only) * [Environment Variables](https://docs.li.fi/agents/quick-start/code-samples#environment-variables) * [Quick Reference](https://docs.li.fi/agents/quick-start/code-samples#quick-reference) * [Node.js (API)](https://docs.li.fi/agents/quick-start/code-samples#node-js-api) * [Node.js (SDK)](https://docs.li.fi/agents/quick-start/code-samples#node-js-sdk) * [Python](https://docs.li.fi/agents/quick-start/code-samples#python) * [Error Handling Patterns](https://docs.li.fi/agents/quick-start/code-samples#error-handling-patterns) This page provides complete, runnable code samples for integrating LI.FI into your AI agent or application. [​](https://docs.li.fi/agents/quick-start/code-samples#node-js-api-only) Node.js (API Only) ---------------------------------------------------------------------------------------------- A complete example using only HTTP requests - no SDK required. Copy Ask AI // lifi-agent.js // Run with: node lifi-agent.js const LIFI_API = 'https://li.quest/v1'; // Optional: Set API key for higher rate limits const API_KEY = process.env.LIFI_API_KEY || ''; const headers = { 'Content-Type': 'application/json', ...(API_KEY && { 'x-lifi-api-key': API_KEY }) }; // Helper: Sleep for exponential backoff const sleep = (ms) => new Promise(resolve => setTimeout(resolve, ms)); // Helper: Fetch with retry and backoff async function fetchWithRetry(url, options = {}, maxRetries = 3) { for (let attempt = 0; attempt < maxRetries; attempt++) { try { const response = await fetch(url, { ...options, headers }); if (response.status === 429) { // Rate limited - exponential backoff const waitTime = Math.pow(2, attempt) * 1000; console.log(`Rate limited. Waiting ${waitTime}ms...`); await sleep(waitTime); continue; } if (!response.ok) { const error = await response.json(); throw new Error(`API Error: ${error.message || response.statusText}`); } return await response.json(); } catch (error) { if (attempt === maxRetries - 1) throw error; await sleep(1000); } } } // Step 1: Get supported chains async function getChains(chainTypes = 'EVM') { const url = `${LIFI_API}/chains?chainTypes=${chainTypes}`; const data = await fetchWithRetry(url); return data.chains; } // Step 2: Get tokens for chains async function getTokens(chainIds) { const url = `${LIFI_API}/tokens?chains=${chainIds.join(',')}`; const data = await fetchWithRetry(url); return data.tokens; } // Step 3: Get a quote async function getQuote(params) { const { fromChain, toChain, fromToken, toToken, fromAmount, fromAddress, slippage = 0.005 } = params; const url = new URL(`${LIFI_API}/quote`); url.searchParams.set('fromChain', fromChain); url.searchParams.set('toChain', toChain); url.searchParams.set('fromToken', fromToken); url.searchParams.set('toToken', toToken); url.searchParams.set('fromAmount', fromAmount); url.searchParams.set('fromAddress', fromAddress); url.searchParams.set('slippage', slippage); return await fetchWithRetry(url.toString()); } // Step 4: Check transfer status async function getStatus(txHash, bridge, fromChain, toChain) { const url = `${LIFI_API}/status?txHash=${txHash}&bridge=${bridge}&fromChain=${fromChain}&toChain=${toChain}`; return await fetchWithRetry(url); } // Step 5: Poll status until complete async function pollStatus(txHash, bridge, fromChain, toChain, maxAttempts = 60) { console.log('Polling transfer status...'); for (let attempt = 0; attempt < maxAttempts; attempt++) { const status = await getStatus(txHash, bridge, fromChain, toChain); console.log(`Status: ${status.status} (${status.substatus || 'no substatus'})`); if (status.status === 'DONE') { if (status.substatus === 'COMPLETED') { console.log('Transfer completed successfully!'); return { success: true, status }; } if (status.substatus === 'PARTIAL') { console.log('Transfer completed with different token'); return { success: true, partial: true, status }; } if (status.substatus === 'REFUNDED') { console.log('Transfer failed - tokens refunded'); return { success: false, refunded: true, status }; } } if (status.status === 'FAILED') { console.log('Transfer failed'); return { success: false, status }; } // Wait 10 seconds before next poll await sleep(10000); } throw new Error('Status polling timeout'); } // Main execution flow async function executeTransfer(params) { console.log('Getting quote...'); const quote = await getQuote(params); console.log(`Quote received: ${quote.tool}`); console.log(`Expected output: ${quote.estimate.toAmount}`); console.log(`Minimum output: ${quote.estimate.toAmountMin}`); // Here you would: // 1. Check if approval is needed (for ERC20 tokens) // 2. Send approval transaction if needed // 3. Send the main transaction using quote.transactionRequest // 4. Get the txHash from the transaction receipt console.log('\nTransaction request ready:'); console.log(JSON.stringify(quote.transactionRequest, null, 2)); return quote; } // Example usage async function main() { try { // Get available chains const chains = await getChains(); console.log(`Found ${chains.length} chains`); // Get quote for 10 USDC from Ethereum to Arbitrum const quote = await executeTransfer({ fromChain: 1, toChain: 42161, fromToken: 'USDC', toToken: 'USDC', fromAmount: '10000000', // 10 USDC (6 decimals) fromAddress: '0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0' // Replace with actual address }); // After executing the transaction, poll for status: // const result = await pollStatus(txHash, quote.tool, 1, 42161); } catch (error) { console.error('Error:', error.message); } } main(); * * * [​](https://docs.li.fi/agents/quick-start/code-samples#node-js-with-sdk) Node.js (with SDK) ---------------------------------------------------------------------------------------------- Using the LI.FI SDK for full execution support. Copy Ask AI // lifi-sdk-agent.js // Install: npm install @lifi/sdk viem // Run with: node lifi-sdk-agent.js import { createConfig, getQuote, executeRoute, convertQuoteToRoute } from '@lifi/sdk'; import { createWalletClient, http } from 'viem'; import { privateKeyToAccount } from 'viem/accounts'; import { mainnet, arbitrum } from 'viem/chains'; // Configuration const PRIVATE_KEY = process.env.PRIVATE_KEY; // Never hardcode! const INTEGRATOR_NAME = 'your-agent-name'; // Initialize SDK createConfig({ integrator: INTEGRATOR_NAME, // Optional: API key for higher rate limits // apiKey: process.env.LIFI_API_KEY, }); // Create wallet client const account = privateKeyToAccount(PRIVATE_KEY); const walletClient = createWalletClient({ account, chain: mainnet, transport: http(), }); // Get a quote async function fetchQuote(params) { const quote = await getQuote({ fromChain: params.fromChain, toChain: params.toChain, fromToken: params.fromToken, toToken: params.toToken, fromAmount: params.fromAmount, fromAddress: account.address, }); return quote; } // Execute the transfer async function executeTransfer(quote) { console.log('Executing transfer...'); // Convert quote to route format for execution const route = convertQuoteToRoute(quote); const result = await executeRoute(route, { // Update hook called on each status change updateRouteHook: (updatedRoute) => { console.log('Route updated:', updatedRoute.id); const step = updatedRoute.steps[0]; if (step?.execution) { console.log(`Execution status: ${step.execution.status}`); } }, }); return result; } // Main flow async function main() { try { console.log(`Wallet address: ${account.address}`); // Get quote const quote = await fetchQuote({ fromChain: 1, // Ethereum toChain: 42161, // Arbitrum fromToken: 'USDC', toToken: 'USDC', fromAmount: '10000000', // 10 USDC }); console.log('Quote received:'); console.log(`- Tool: ${quote.tool}`); console.log(`- Expected: ${quote.estimate.toAmount}`); console.log(`- Minimum: ${quote.estimate.toAmountMin}`); // Execute (uncomment to run actual transfer) // const result = await executeTransfer(quote); // console.log('Transfer complete:', result); } catch (error) { console.error('Error:', error.message); } } main(); * * * [​](https://docs.li.fi/agents/quick-start/code-samples#python-api-only) Python (API Only) -------------------------------------------------------------------------------------------- Complete Python example using only HTTP requests. Copy Ask AI # lifi_agent.py # Install: pip install requests # Run with: python lifi_agent.py import os import time import requests from typing import Optional, Dict, Any, List LIFI_API = "https://li.quest/v1" API_KEY = os.environ.get("LIFI_API_KEY", "") def get_headers() -> Dict[str, str]: headers = {"Content-Type": "application/json"} if API_KEY: headers["x-lifi-api-key"] = API_KEY return headers def fetch_with_retry(url: str, max_retries: int = 3) -> Dict[str, Any]: """Fetch with exponential backoff for rate limiting.""" for attempt in range(max_retries): try: response = requests.get(url, headers=get_headers()) if response.status_code == 429: wait_time = (2 ** attempt) print(f"Rate limited. Waiting {wait_time}s...") time.sleep(wait_time) continue response.raise_for_status() return response.json() except requests.exceptions.RequestException as e: if attempt == max_retries - 1: raise time.sleep(1) raise Exception("Max retries exceeded") def get_chains(chain_types: str = "EVM") -> List[Dict]: """Get supported chains.""" url = f"{LIFI_API}/chains?chainTypes={chain_types}" data = fetch_with_retry(url) return data["chains"] def get_tokens(chain_ids: List[int]) -> Dict[str, List[Dict]]: """Get tokens for specified chains.""" chains_param = ",".join(str(c) for c in chain_ids) url = f"{LIFI_API}/tokens?chains={chains_param}" data = fetch_with_retry(url) return data["tokens"] def get_quote( from_chain: int, to_chain: int, from_token: str, to_token: str, from_amount: str, from_address: str, slippage: float = 0.005 ) -> Dict[str, Any]: """Get a quote for token transfer.""" params = { "fromChain": from_chain, "toChain": to_chain, "fromToken": from_token, "toToken": to_token, "fromAmount": from_amount, "fromAddress": from_address, "slippage": slippage } url = f"{LIFI_API}/quote?" + "&".join(f"{k}={v}" for k, v in params.items()) return fetch_with_retry(url) def get_status( tx_hash: str, bridge: str, from_chain: int, to_chain: int ) -> Dict[str, Any]: """Check transfer status.""" url = f"{LIFI_API}/status?txHash={tx_hash}&bridge={bridge}&fromChain={from_chain}&toChain={to_chain}" return fetch_with_retry(url) def poll_status( tx_hash: str, bridge: str, from_chain: int, to_chain: int, max_attempts: int = 60, poll_interval: int = 10 ) -> Dict[str, Any]: """Poll status until transfer completes.""" print("Polling transfer status...") for attempt in range(max_attempts): status = get_status(tx_hash, bridge, from_chain, to_chain) status_str = status.get("status", "UNKNOWN") substatus_str = status.get("substatus", "") print(f"Status: {status_str} ({substatus_str})") if status_str == "DONE": if substatus_str == "COMPLETED": print("Transfer completed successfully!") return {"success": True, "status": status} elif substatus_str == "PARTIAL": print("Transfer completed with different token") return {"success": True, "partial": True, "status": status} elif substatus_str == "REFUNDED": print("Transfer failed - tokens refunded") return {"success": False, "refunded": True, "status": status} if status_str == "FAILED": print("Transfer failed") return {"success": False, "status": status} time.sleep(poll_interval) raise Exception("Status polling timeout") def execute_transfer( from_chain: int, to_chain: int, from_token: str, to_token: str, from_amount: str, from_address: str ) -> Dict[str, Any]: """Get quote and prepare for execution.""" print("Getting quote...") quote = get_quote( from_chain=from_chain, to_chain=to_chain, from_token=from_token, to_token=to_token, from_amount=from_amount, from_address=from_address ) print(f"Quote received: {quote['tool']}") print(f"Expected output: {quote['estimate']['toAmount']}") print(f"Minimum output: {quote['estimate']['toAmountMin']}") # Transaction request is ready for signing print("\nTransaction request:") tx_request = quote["transactionRequest"] print(f" To: {tx_request['to']}") print(f" Value: {tx_request['value']}") print(f" Gas Limit: {tx_request.get('gasLimit', 'auto')}") return quote def main(): try: # Get available chains chains = get_chains() print(f"Found {len(chains)} chains") # Get quote for 10 USDC from Ethereum to Arbitrum quote = execute_transfer( from_chain=1, to_chain=42161, from_token="USDC", to_token="USDC", from_amount="10000000", # 10 USDC (6 decimals) from_address="0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" # Replace ) # After executing the transaction, poll for status: # result = poll_status(tx_hash, quote["tool"], 1, 42161) except Exception as e: print(f"Error: {e}") if __name__ == "__main__": main() * * * [​](https://docs.li.fi/agents/quick-start/code-samples#environment-variables) Environment Variables ------------------------------------------------------------------------------------------------------ Both examples support these environment variables: Copy Ask AI # Optional: API key for higher rate limits export LIFI_API_KEY="your-api-key" # For SDK example: Private key for signing (never commit!) export PRIVATE_KEY="0x..." * * * [​](https://docs.li.fi/agents/quick-start/code-samples#quick-reference) Quick Reference ------------------------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/quick-start/code-samples#node-js-api) Node.js (API) Copy Ask AI # No dependencies required (uses native fetch) node lifi-agent.js ### [​](https://docs.li.fi/agents/quick-start/code-samples#node-js-sdk) Node.js (SDK) Copy Ask AI npm install @lifi/sdk viem node lifi-sdk-agent.js ### [​](https://docs.li.fi/agents/quick-start/code-samples#python) Python Copy Ask AI pip install requests python lifi_agent.py * * * [​](https://docs.li.fi/agents/quick-start/code-samples#error-handling-patterns) Error Handling Patterns ---------------------------------------------------------------------------------------------------------- Both examples include these error handling patterns: 1. **Exponential backoff** for rate limits (429) 2. **Retry logic** for transient failures 3. **Status polling** with timeout 4. **Graceful error messages** for debugging For more details on error handling, see [Error Playbooks](https://docs.li.fi/agents/reference/error-playbooks) . [Decision Tables](https://docs.li.fi/agents/quick-start/decision-tables) [Token Approvals](https://docs.li.fi/agents/workflows/approvals) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Perform multiple contract calls across blockchains (BETA) - LI.FI [Skip to main content](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Single-step quote Perform multiple contract calls across blockchains (BETA) [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Perform multiple contract calls across blockchains (BETA) cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/quote/contractCalls \ --header 'Content-Type: application/json' \ --data ' { "fromChain": 10, "fromToken": "0x4200000000000000000000000000000000000042", "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toChain": 1, "toToken": "ETH", "toAmount": "100000000000001", "contractCalls": [\ {\ "fromAmount": "100000000000001",\ "fromTokenAddress": "0x0000000000000000000000000000000000000000",\ "toTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toContractAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toContractCallData": "0x",\ "toContractGasLimit": "110000"\ },\ {\ "fromAmount": "100000000000000",\ "fromTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toTokenAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",\ "toContractAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",\ "toFallbackAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toContractCallData": "0xea598cb000000000000000000000000000000000000000000000000000005af3107a4000",\ "toContractGasLimit": "100000"\ }\ ], "integrator": "muc-hackaton-postman" } ' 200 Copy Ask AI { "exchanges": [\ {\ "key": "",\ "name": "0x",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.svg",\ "supportedChains": [\ "1",\ "137",\ "56"\ ]\ }\ ], "bridges": [\ {\ "key": "",\ "name": "Connext",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/relay.svg",\ "supportedChains": [\ {\ "fromChainId": 137,\ "toChainId": 1\ }\ ]\ }\ ] } POST https://li.questhttps://staging.li.quest / v1 / quote / contractCalls Try it Perform multiple contract calls across blockchains (BETA) cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/quote/contractCalls \ --header 'Content-Type: application/json' \ --data ' { "fromChain": 10, "fromToken": "0x4200000000000000000000000000000000000042", "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toChain": 1, "toToken": "ETH", "toAmount": "100000000000001", "contractCalls": [\ {\ "fromAmount": "100000000000001",\ "fromTokenAddress": "0x0000000000000000000000000000000000000000",\ "toTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toContractAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toContractCallData": "0x",\ "toContractGasLimit": "110000"\ },\ {\ "fromAmount": "100000000000000",\ "fromTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",\ "toTokenAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",\ "toContractAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",\ "toFallbackAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toContractCallData": "0xea598cb000000000000000000000000000000000000000000000000000005af3107a4000",\ "toContractGasLimit": "100000"\ }\ ], "integrator": "muc-hackaton-postman" } ' 200 Copy Ask AI { "exchanges": [\ {\ "key": "",\ "name": "0x",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/zerox.svg",\ "supportedChains": [\ "1",\ "137",\ "56"\ ]\ }\ ], "bridges": [\ {\ "key": "",\ "name": "Connext",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/relay.svg",\ "supportedChains": [\ {\ "fromChainId": 137,\ "toChainId": 1\ }\ ]\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#parameter-x-lifi-api-key) x-lifi-api-key string The apiKey allows you to authenticate on the API. #### Body application/json Object describing what tokens to transfer and how to interact with the destination contracts. Object defining instructions on how to perform multiple cross-chain/same-chain calls [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-from-chain) fromChain number required The sending chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-from-token) fromToken string required The token that should be transferred. Can be the address or the symbol [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-from-address) fromAddress string required The wallet that will send the transaction and contains the starting token [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-to-chain) toChain number required The receiving chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-to-token) toToken string required The token required to perform the contract interaction (can be something to stake, donate or to be used as payment) [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-to-amount) toAmount string required The amount of token required by the contract interaction. The LI.FI API will try and generate a quote that guarantees at least that amount on the destination chain. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-contract-calls) contractCalls Root Type for ContractCall · object\[\] required Show child attributes [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-to-fallback-address) toFallbackAddress string If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-contract-outputs-token) contractOutputsToken string Some contract interactions will output a token. This is the case in things like staking. Omit this parameter if no token should be returned to the user. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-slippage) slippage number The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. Required range: `0 <= x <= 1` [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-allow-bridges) allowBridges string\[\] List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-deny-bridges) denyBridges string\[\] List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-prefer-bridges) preferBridges string\[\] List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-allow-exchanges) allowExchanges string\[\] List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-deny-exchanges) denyExchanges string\[\] List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-prefer-exchanges) preferExchanges string\[\] List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-allow-destination-call) allowDestinationCall boolean 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`. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#body-fee) fee number The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%. Required range: `0 <= x < 1` #### Response 200 - application/json Object listing all the currently enabled bridges and exchanges. [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#response-exchanges) exchanges object\[\] Show child attributes [​](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta#response-bridges) bridges object\[\] Show child attributes [Get a quote for a token transfer](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1) [Get a set of routes for a request that describes a transfer of tokens](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Stablecoin preset - LI.FI [Skip to main content](https://docs.li.fi/api-reference/presets/stablecoin#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation API presets Stablecoin preset [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Quick start](https://docs.li.fi/api-reference/presets/stablecoin#quick-start) * [Quote request (GET)](https://docs.li.fi/api-reference/presets/stablecoin#quote-request-get) * [Advanced routes (POST)](https://docs.li.fi/api-reference/presets/stablecoin#advanced-routes-post) * [JavaScript/TypeScript](https://docs.li.fi/api-reference/presets/stablecoin#javascript%2Ftypescript) * [Preset defaults](https://docs.li.fi/api-reference/presets/stablecoin#preset-defaults) * [Overrides example](https://docs.li.fi/api-reference/presets/stablecoin#overrides-example) * [Tool preferences](https://docs.li.fi/api-reference/presets/stablecoin#tool-preferences) * [Check supported stablecoins](https://docs.li.fi/api-reference/presets/stablecoin#check-supported-stablecoins) * [All stablecoins](https://docs.li.fi/api-reference/presets/stablecoin#all-stablecoins) * [Stablecoins on a specific chain](https://docs.li.fi/api-reference/presets/stablecoin#stablecoins-on-a-specific-chain) * [Related docs](https://docs.li.fi/api-reference/presets/stablecoin#related-docs) Use the stablecoin preset when you need LI.FI to favor tight slippage and reliable routing for stablecoin moves. It is built for experiences such as: * Treasury and treasury-rebalance flows. * Larger cross-chain stablecoin transfers that demand predictable execution. * Integrations that require a safe default but still override specific fields when needed. [​](https://docs.li.fi/api-reference/presets/stablecoin#quick-start) Quick start ----------------------------------------------------------------------------------- 1. Add `preset=stablecoin` to your quote or advanced routes request. 2. Send the request as usual. LI.FI applies the preset defaults first, then merges any overrides you supply. ### [​](https://docs.li.fi/api-reference/presets/stablecoin#quote-request-get) Quote request (GET) Copy Ask AI curl "https://li.quest/v1/quote?fromChain=1&toChain=137&fromToken=0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C&toToken=0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174&fromAddress=0x123...&fromAmount=1000000000000000000&preset=stablecoin" Review the full query parameter schema in the [`GET /v1/quote` reference](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) . ### [​](https://docs.li.fi/api-reference/presets/stablecoin#advanced-routes-post) Advanced routes (POST) Copy Ask AI curl -X POST "https://li.quest/v1/advanced/routes" \ -H "Content-Type: application/json" \ -d '{ "fromChainId": 1, "toChainId": 137, "fromAmount": "1000000000000000000", "fromTokenAddress": "0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C", "toTokenAddress": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", "options": { "preset": "stablecoin" } }' See the complete request body structure in the [`POST /v1/advanced/routes` reference](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) . ### [​](https://docs.li.fi/api-reference/presets/stablecoin#javascript/typescript) JavaScript/TypeScript Copy Ask AI const quoteRequest = { fromChain: 1, toChain: 137, fromToken: "0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C", toToken: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", fromAddress: "0x123...", fromAmount: "1000000000000000000", preset: "stablecoin" }; [​](https://docs.li.fi/api-reference/presets/stablecoin#preset-defaults) Preset defaults ------------------------------------------------------------------------------------------- The stablecoin preset configures these defaults to protect execution quality: * order: `CHEAPEST` * slippage: `0.001` (0.1%) * Price impact capped at 2% * Shortlist of bridges that are prime for stablecoin transfers * All exchanges enabled by default If your request includes conflicting values, your request wins. For instance, when you supply `denyBridges` or similar list overrides, the preset’s defaults are replaced by the values you send. Include all bridges you want denied (existing and new) in the request payload. This means you can override the preset defaults with your own values as shown below. [​](https://docs.li.fi/api-reference/presets/stablecoin#overrides-example) Overrides example ----------------------------------------------------------------------------------------------- Copy Ask AI const routesRequestWithOverrides = { fromChainId: 1, toChainId: 137, fromAmount: "1000000000000000000", fromTokenAddress: "0xA0b86a33E6441b8C4C8C0C4C0C4C0C4C0C4C0C4C", toTokenAddress: "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174", options: { preset: "stablecoin", slippage: 0.005, // loosen to 0.5% instead of the default 0.1% order: "FASTEST" // override the default CHEAPEST order } }; Integrators are advised to use the stablecoin preset as is and only override its values if absolutely necessary, since the default options are carefully optimized for stablecoin transfers. To see all available options you can override, check the [options schema](https://github.com/lifinance/types/blob/main/src/api.ts#L116) . [​](https://docs.li.fi/api-reference/presets/stablecoin#tool-preferences) Tool preferences --------------------------------------------------------------------------------------------- For bridging, the preset prioritizes stablecoin-friendly paths such as: * Mint-and-burn flows like Glacis, Mayan Swift, Mayan MCTP, and Celer * Intent and solver-based options like Eco, Relay, Across, and Gaszip * Additional tools as they are vetted and added over time [​](https://docs.li.fi/api-reference/presets/stablecoin#check-supported-stablecoins) Check supported stablecoins ------------------------------------------------------------------------------------------------------------------- Stablecoin support is driven by LI.FI’s token tagging. Use [`/v1/tokens`](https://docs.li.fi/api-reference/fetch-all-known-tokens) with the `tags` filter to confirm which assets qualify. ### [​](https://docs.li.fi/api-reference/presets/stablecoin#all-stablecoins) All stablecoins Copy Ask AI curl "https://li.quest/v1/tokens?tags=stablecoin" ### [​](https://docs.li.fi/api-reference/presets/stablecoin#stablecoins-on-a-specific-chain) Stablecoins on a specific chain Copy Ask AI curl "https://li.quest/v1/tokens?chains=ARB&tags=stablecoin" Combine the `tags` filter with `chains` filters to match your integration. Need the full parameter list? Check the [`GET /v1/tokens` reference](https://docs.li.fi/api-reference/fetch-all-known-tokens) . [​](https://docs.li.fi/api-reference/presets/stablecoin#related-docs) Related docs ------------------------------------------------------------------------------------- * [API presets overview](https://docs.li.fi/api-reference/presets/overview) * [`GET /v1/quote`](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) * [`POST /v1/advanced/routes`](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) [API Presets](https://docs.li.fi/api-reference/presets/overview) [Get a quote for a token transfer](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Populate a step with transaction data - LI.FI [Skip to main content](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Advanced routes Populate a step with transaction data [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Populate a step with transaction data cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/advanced/stepTransaction \ --header 'Content-Type: application/json' \ --data ' { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "priceUSD": "1", "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "tool": "1inch", "executionDuration": 30, "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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"\ }\ }\ ] }, "integrator": "fee-demo", "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "priceUSD": "1",\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "tool": "1inch",\ "executionDuration": 30,\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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"\ }\ }\ ]\ }\ }\ ] } ' 200 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } POST https://li.questhttps://staging.li.quest / v1 / advanced / stepTransaction Try it Populate a step with transaction data cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/advanced/stepTransaction \ --header 'Content-Type: application/json' \ --data ' { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "priceUSD": "1", "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "tool": "1inch", "executionDuration": 30, "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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"\ }\ }\ ] }, "integrator": "fee-demo", "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "priceUSD": "1",\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "tool": "1inch",\ "executionDuration": 30,\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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"\ }\ }\ ]\ }\ }\ ] } ' 200 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#parameter-skip-simulation) skipSimulation boolean Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate. [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#parameter-mayan-non-evm-permit-signature) mayanNonEvmPermitSignature boolean Mayan specific option to bridge from non-EVM chain to Hyperliquid #### Body application/json The step object Object that represents one step of a `Route` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-id) id string required Unique identifier of the step [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-type) type enum 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. Available options: `swap`, `cross`, `lifi`, `protocol` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-tool) tool string required The tool used for this step. E.g. `relay` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-action) action Root Type for Action · object required The action of the step Show child attributes Example: { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromToken": { "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "chainId": 100, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0.0455272371751059", "logoURI": "" }, "toChainId": 137, "toToken": { "address": "0xc0b2983a17573660053beeed6fdb1053107cf387", "symbol": "MIVA", "decimals": 18, "chainId": 137, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0", "logoURI": "" }, "slippage": 0.003} [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-tool-details) toolDetails object The details of the tool used for this step. E.g. `relay` Show child attributes [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-estimate) estimate Root Type for Estimate · object The estimation for the step Show child attributes Example: { "fromAmount": "1000000000000000000", "toAmount": "999500000000000000", "toAmountMin": "999500000000000000", "tool": "allbridge", "executionDuration": 60, "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.0455272371751059", "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.0455272371751059", "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.0455272371751059", "logoURI": "" }, "amount": "500000000000000", "amountUSD": "22763618587552.95", "included": true } ], "gasCosts": [ { "type": "SEND", "price": "1.22", "estimate": "140000", "limit": "175000", "amount": "170800", "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": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB", "initiator": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "sendingChainId": 100, "sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "amount": "1000000000000000000", "receivingChainId": 137, "receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387", "amountReceived": "999500000000000000", "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "transactionId": "0x9f54c1764e19367c44706f4a6253941b81e9ec524af5590091aa8ae67e7644ed", "expiry": 1643369368, "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "callTo": "0x0000000000000000000000000000000000000000", "encryptedCallData": "0x", "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93", "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113", "bidExpiry": 1643110469 }, "gasFeeInReceivingToken": "0", "totalFee": "500000000000000", "metaTxRelayerFee": "0", "routerFee": "500000000000000" }} [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-included-steps) includedSteps Root Type for Internal Step · object\[\] Show child attributes [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-execution) execution any An objection containing status information about the execution [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#body-transaction-request) transactionRequest any An ether.js TransactionRequest that can be triggered using a wallet provider. ([https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) ) #### Response 200 application/json The step populated with the transaction data Object that represents one step of a `Route` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-id) id string required Unique identifier of the step [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-type) type enum 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. Available options: `swap`, `cross`, `lifi`, `protocol` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-tool) tool string required The tool used for this step. E.g. `relay` [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-action) action Root Type for Action · object required The action of the step Show child attributes Example: { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromToken": { "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "chainId": 100, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0.0455272371751059", "logoURI": "" }, "toChainId": 137, "toToken": { "address": "0xc0b2983a17573660053beeed6fdb1053107cf387", "symbol": "MIVA", "decimals": 18, "chainId": 137, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0", "logoURI": "" }, "slippage": 0.003} [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-tool-details) toolDetails object The details of the tool used for this step. E.g. `relay` Show child attributes [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-estimate) estimate Root Type for Estimate · object The estimation for the step Show child attributes Example: { "fromAmount": "1000000000000000000", "toAmount": "999500000000000000", "toAmountMin": "999500000000000000", "tool": "allbridge", "executionDuration": 60, "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.0455272371751059", "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.0455272371751059", "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.0455272371751059", "logoURI": "" }, "amount": "500000000000000", "amountUSD": "22763618587552.95", "included": true } ], "gasCosts": [ { "type": "SEND", "price": "1.22", "estimate": "140000", "limit": "175000", "amount": "170800", "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": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB", "initiator": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "sendingChainId": 100, "sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "amount": "1000000000000000000", "receivingChainId": 137, "receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387", "amountReceived": "999500000000000000", "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "transactionId": "0x9f54c1764e19367c44706f4a6253941b81e9ec524af5590091aa8ae67e7644ed", "expiry": 1643369368, "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "callTo": "0x0000000000000000000000000000000000000000", "encryptedCallData": "0x", "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93", "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113", "bidExpiry": 1643110469 }, "gasFeeInReceivingToken": "0", "totalFee": "500000000000000", "metaTxRelayerFee": "0", "routerFee": "500000000000000" }} [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-included-steps) includedSteps Root Type for Internal Step · object\[\] Show child attributes [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-execution) execution any An objection containing status information about the execution [​](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data#response-transaction-request) transactionRequest any An ether.js TransactionRequest that can be triggered using a wallet provider. ([https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) ) [Get a set of routes for a request that describes a transfer of tokens](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens) [Parse transaction call data (BETA)](https://docs.li.fi/api-reference/parse-transaction-call-data-beta) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Returns all possible connections based on a from- or toChain. - LI.FI [Skip to main content](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Connections Returns all possible connections based on a from- or toChain. [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Returns all possible connections based on a from- or toChain. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/connections 200 Copy Ask AI { "connections": [\ {\ "fromChainId": 137,\ "toChainId": 1,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 1,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x6b175474e89094c44da98b954eedeac495271d0f/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 1,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 1,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xdac17f958d2ee523a2206206994597c13d831ec7/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 10,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 10,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0xda10009cbd5d07dd0cecc66161fc93d7c9000da1/45965130df45ecf234ff03ce28299cd1.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 10,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/op/d61441782d4a08a7479d54aea211679e.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 10,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x7f5c764cbc14f9669b88837ca1490cca17c31607/773a0161709a55edc211c3fa67f7c1a7.png",\ "priceUSD": "1"\ },\ {\ "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 10,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x94b008aa00579c1307b0ef2c499ad98a8ce58e58/37c9c2ddceb0c83f0f4c07ea4fa53e9d.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 56,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 56,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 56,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x2170ed0880ac9a755fd29b2688956bd959f933f8/80dd95753396b5619cf84b0df135eae5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",\ "decimals": 18,\ "symbol": "USDC",\ "chainId": 56,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x8ac76a51cc950d9822d68b83f0e1ad97b32cd580d/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0x55d398326f99059ff775485246999027b3197955",\ "decimals": 18,\ "symbol": "USDT",\ "chainId": 56,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x55d398326f99059ff775485246999027b3197955/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / connections Try it Returns all possible connections based on a from- or toChain. cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/connections 200 Copy Ask AI { "connections": [\ {\ "fromChainId": 137,\ "toChainId": 1,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 1,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x6b175474e89094c44da98b954eedeac495271d0f/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 1,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 1,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xdac17f958d2ee523a2206206994597c13d831ec7/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 10,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 10,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0xda10009cbd5d07dd0cecc66161fc93d7c9000da1/45965130df45ecf234ff03ce28299cd1.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 10,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/op/d61441782d4a08a7479d54aea211679e.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 10,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x7f5c764cbc14f9669b88837ca1490cca17c31607/773a0161709a55edc211c3fa67f7c1a7.png",\ "priceUSD": "1"\ },\ {\ "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 10,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x94b008aa00579c1307b0ef2c499ad98a8ce58e58/37c9c2ddceb0c83f0f4c07ea4fa53e9d.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 56,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 56,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 56,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x2170ed0880ac9a755fd29b2688956bd959f933f8/80dd95753396b5619cf84b0df135eae5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",\ "decimals": 18,\ "symbol": "USDC",\ "chainId": 56,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x8ac76a51cc950d9822d68b83f0e1ad97b32cd580d/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0x55d398326f99059ff775485246999027b3197955",\ "decimals": 18,\ "symbol": "USDT",\ "chainId": 56,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x55d398326f99059ff775485246999027b3197955/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-from-chain) fromChain string The chain that should be the start of the possible connections. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-to-chain) toChain string The chain that should be the end of the possible connections. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-from-token) fromToken string Only return connections starting with this token. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-to-token) toToken string Only return connections ending with this token. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-chain-types) chainTypes string Restrict the resulting tokens to the given chainTypes. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-bridges) allowBridges string\[\] List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-deny-bridges) denyBridges string\[\] List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-prefer-bridges) preferBridges string\[\] List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-exchanges) allowExchanges string\[\] List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-deny-exchanges) denyExchanges string\[\] List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-prefer-exchanges) preferExchanges string\[\] List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-switch-chain) allowSwitchChain boolean default:true Whether connections that require chain switch should be included in the response. [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-destination-call) allowDestinationCall boolean default:true Whether connections that includes destination call should be included in the response. #### Response 200 - application/json [​](https://docs.li.fi/api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#response-connections) connections Root Type for Connection · object\[\] The possible connections Show child attributes [Get available bridges and exchanges](https://docs.li.fi/api-reference/get-available-bridges-and-exchanges) [Get gas price for the specified chainId](https://docs.li.fi/api-reference/gas/get-gas-price-for-the-specified-chainid) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Technical Requirements - LI.FI [Skip to main content](https://docs.li.fi/composer/for-protocols/technical-requirements#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation For Protocol Teams Technical Requirements [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Core Requirements](https://docs.li.fi/composer/for-protocols/technical-requirements#core-requirements) * [1\. EVM Compatibility](https://docs.li.fi/composer/for-protocols/technical-requirements#1-evm-compatibility) * [2\. Tokenised Position Return](https://docs.li.fi/composer/for-protocols/technical-requirements#2-tokenised-position-return) * [3\. Standard Deposit Function](https://docs.li.fi/composer/for-protocols/technical-requirements#3-standard-deposit-function) * [Deposit vs. Withdraw Support](https://docs.li.fi/composer/for-protocols/technical-requirements#deposit-vs-withdraw-support) * [After Integration](https://docs.li.fi/composer/for-protocols/technical-requirements#after-integration) * [Contact](https://docs.li.fi/composer/for-protocols/technical-requirements#contact) * [Related Pages](https://docs.li.fi/composer/for-protocols/technical-requirements#related-pages) This page details the technical requirements your protocol must meet to be integrated with Composer. * * * [​](https://docs.li.fi/composer/for-protocols/technical-requirements#core-requirements) Core Requirements ------------------------------------------------------------------------------------------------------------ ### [​](https://docs.li.fi/composer/for-protocols/technical-requirements#1-evm-compatibility) 1\. EVM Compatibility Your protocol must be deployed on an **EVM-compatible chain**. Composer’s onchain VM executes compiled bytecode on EVM chains. Non-EVM chains (Solana, SUI, etc.) are not currently supported. ### [​](https://docs.li.fi/composer/for-protocols/technical-requirements#2-tokenised-position-return) 2\. Tokenised Position Return Upon deposit, your protocol must return a **token** to the user’s wallet. Composer routes are identified by the `toToken` parameter, which must be a valid ERC-20 token that represents the user’s position. **Supported token types:** | Token Type | Example | Protocol Example | | --- | --- | --- | | ERC-4626 vault shares | Vault share tokens | Morpho, Euler | | aTokens | Interest-bearing receipt tokens | Aave V3 | | Liquid staking tokens | LSTs representing staked positions | Lido wstETH, EtherFi | | Yield tokens | Tokens representing yield positions | Pendle, Ethena sUSDe | | Custom receipt tokens | Protocol-specific deposit receipts | Felix Vanilla, Neverland | ### [​](https://docs.li.fi/composer/for-protocols/technical-requirements#3-standard-deposit-function) 3\. Standard Deposit Function Your deposit function should accept standard parameters that Composer’s eDSL compiler can encode. Common patterns include: * **ERC-4626 `deposit(uint256 assets, address receiver)`** — Standard vault interface * **Aave-style `supply(address asset, uint256 amount, address onBehalfOf, uint16 referralCode)`** — Lending pool interface * **Staking `stake(uint256 amount)`** or `wrap(uint256 amount)` — Staking/wrapping interface Composer’s eDSL supports dynamic calldata injection, meaning the exact deposit amount is determined at execution time based on the output of preceding swap/bridge steps. Your deposit function must accept a standard amount parameter. * * * [​](https://docs.li.fi/composer/for-protocols/technical-requirements#deposit-vs-withdraw-support) Deposit vs. Withdraw Support --------------------------------------------------------------------------------------------------------------------------------- Composer supports two action types per protocol: | Action | Description | Required? | | --- | --- | --- | | **Deposit** | User sends tokens, receives position tokens | Yes (minimum) | | **Withdraw** | User sends position tokens, receives underlying tokens | Optional | Some protocols are integrated with **deposit only** (e.g., Kinetiq, Ethena, Maple). This is acceptable, and withdraw support can be added later. * * * [​](https://docs.li.fi/composer/for-protocols/technical-requirements#after-integration) After Integration ------------------------------------------------------------------------------------------------------------ Once live, your protocol is accessible via: Copy Ask AI # Users can deposit from any token on any EVM chain curl -X GET 'https://li.quest/v1/quote?\ fromChain=SOURCE_CHAIN_ID&\ toChain=YOUR_PROTOCOL_CHAIN_ID&\ fromToken=ANY_TOKEN_ADDRESS&\ toToken=YOUR_VAULT_TOKEN_ADDRESS&\ fromAddress=0xUSER_WALLET&\ toAddress=0xUSER_WALLET&\ fromAmount=AMOUNT' LI.FI handles routing, bridging, swapping, and depositing automatically. * * * [​](https://docs.li.fi/composer/for-protocols/technical-requirements#contact) Contact ---------------------------------------------------------------------------------------- To start the integration process or ask questions, reach out to the LI.FI team: * **Email**: [support@li.fi](mailto:support@li.fi) * **Website**: [li.fi](https://li.fi/) * * * [​](https://docs.li.fi/composer/for-protocols/technical-requirements#related-pages) Related Pages ---------------------------------------------------------------------------------------------------- [Integration Guide\ -----------------\ \ Why integrate and what you get](https://docs.li.fi/composer/for-protocols/integration-guide) [How Composer Works\ ------------------\ \ Architecture: Onchain VM, eDSL, and compilation](https://docs.li.fi/composer/how-it-works) [Supported Protocols\ -------------------\ \ Currently integrated protocols](https://docs.li.fi/composer/reference/supported-protocols) [Limitations\ -----------\ \ Current constraints and limitations](https://docs.li.fi/composer/reference/limitations) [Integrate Your Protocol with Composer](https://docs.li.fi/composer/for-protocols/integration-guide) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Integrate Your Protocol with Composer - LI.FI [Skip to main content](https://docs.li.fi/composer/for-protocols/integration-guide#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation For Protocol Teams Integrate Your Protocol with Composer [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Why Integrate with Composer](https://docs.li.fi/composer/for-protocols/integration-guide#why-integrate-with-composer) * [Reach Users on Every Chain](https://docs.li.fi/composer/for-protocols/integration-guide#reach-users-on-every-chain) * [Distribution Through the LI.FI Ecosystem](https://docs.li.fi/composer/for-protocols/integration-guide#distribution-through-the-li-fi-ecosystem) * [Better UX for Your Users](https://docs.li.fi/composer/for-protocols/integration-guide#better-ux-for-your-users) * [Pre-Execution Simulation](https://docs.li.fi/composer/for-protocols/integration-guide#pre-execution-simulation) * [Integration Requirements](https://docs.li.fi/composer/for-protocols/integration-guide#integration-requirements) * [1\. EVM-Compatible Chain](https://docs.li.fi/composer/for-protocols/integration-guide#1-evm-compatible-chain) * [2\. Tokenised Positions](https://docs.li.fi/composer/for-protocols/integration-guide#2-tokenised-positions) * [3\. Standard Deposit Interface](https://docs.li.fi/composer/for-protocols/integration-guide#3-standard-deposit-interface) * [Currently Integrated Protocols](https://docs.li.fi/composer/for-protocols/integration-guide#currently-integrated-protocols) * [Getting Integrated](https://docs.li.fi/composer/for-protocols/integration-guide#getting-integrated) * [What You Get](https://docs.li.fi/composer/for-protocols/integration-guide#what-you-get) * [Next Steps](https://docs.li.fi/composer/for-protocols/integration-guide#next-steps) LI.FI Composer enables users to deposit into your protocol from **any token on any EVM chain** in a single transaction. This page explains why you should integrate and how the process works. * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#why-integrate-with-composer) Why Integrate with Composer --------------------------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#reach-users-on-every-chain) Reach Users on Every Chain Without Composer, users must manually bridge assets, swap tokens, and navigate to your protocol’s UI. With Composer, any user on any supported EVM chain can deposit into your protocol in one click, directly from wallets, dApps, and aggregators that integrate LI.FI. ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#distribution-through-the-li-fi-ecosystem) Distribution Through the LI.FI Ecosystem LI.FI is integrated into hundreds of wallets, dApps, and DeFi platforms. When your protocol is available via Composer, it becomes accessible through: * **LI.FI API** — used by integrators building custom DeFi experiences * **LI.FI SDK** — TypeScript SDK for frontend and backend applications * **LI.FI Widget** — embeddable UI component used by wallets and dApps ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#better-ux-for-your-users) Better UX for Your Users Composer transforms multi-step, multi-chain operations into a single transaction: | Without Composer | With Composer | | --- | --- | | Bridge assets to the right chain | One transaction | | Swap to the required token | One signature | | Approve the token | One click | | Deposit into the protocol | Atomic execution | ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#pre-execution-simulation) Pre-Execution Simulation Every Composer transaction is simulated before execution, giving users certainty about the outcome before they sign. This reduces failed transactions and improves trust in your protocol. * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#integration-requirements) Integration Requirements --------------------------------------------------------------------------------------------------------------------- To be integrated with Composer, your protocol must meet these requirements: ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#1-evm-compatible-chain) 1\. EVM-Compatible Chain Composer currently supports **EVM-compatible chains only**. Solana and other non-EVM chains are not yet supported. ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#2-tokenised-positions) 2\. Tokenised Positions Your protocol must return a **tokenised position** to the user upon deposit. This includes: * **Vault tokens** (e.g., ERC-4626 vault shares) * **Receipt tokens** (e.g., Aave aTokens) * **Liquid staking tokens** (e.g., wstETH) * **Yield tokens** (e.g., Pendle yield tokens) Protocols that do not return a token upon deposit are not currently supported. ### [​](https://docs.li.fi/composer/for-protocols/integration-guide#3-standard-deposit-interface) 3\. Standard Deposit Interface Your protocol’s deposit function should follow standard patterns that Composer’s eDSL compiler can encode. The LI.FI team will work with you to ensure compatibility. * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#currently-integrated-protocols) Currently Integrated Protocols --------------------------------------------------------------------------------------------------------------------------------- The following protocols are already integrated with Composer, demonstrating the range of protocol types supported: | Protocol | Type | Actions | | --- | --- | --- | | Morpho V1 and V2 | Lending / Vaults | Deposit, Withdraw | | Aave V3 | Lending | Deposit, Withdraw | | Euler | Lending | Deposit, Withdraw | | Lido wstETH | Liquid Staking | Deposit, Withdraw | | EtherFi | Liquid Staking | Deposit, Withdraw | | Pendle | Yield | Deposit, Withdraw | | Felix Vanilla | Vaults | Deposit, Withdraw | | HyperLend | Lending | Deposit, Withdraw | | Neverland | Vaults | Deposit, Withdraw | | Seamless | Lending | Deposit, Withdraw | | USDai | Yield | Deposit, Withdraw | | Kinetiq | Staking | Deposit | | Kinetiq Earn (vkHYPE) | Yield | Deposit | | Ethena | Yield | Deposit | | Maple | Lending | Deposit | For the full reference, see [Supported Protocols](https://docs.li.fi/composer/reference/supported-protocols) . * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#getting-integrated) Getting Integrated --------------------------------------------------------------------------------------------------------- Integrations are handled by the LI.FI team. Partner protocols can also be invited to contribute to the Composer backend codebase directly.[Apply for Composer Integration\ ------------------------------\ \ Fill out the protocol integration form to start the process.](https://forms.gle/h1d265zuSWfQ3jsq9) You can also reach out directly: * **GitHub**: [LI.FI GitHub](https://github.com/lifinance/) * **Email**: [marketing@li.finance](mailto:marketing@li.finance) For detailed technical requirements, see [Technical Requirements](https://docs.li.fi/composer/for-protocols/technical-requirements) . * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#what-you-get) What You Get --------------------------------------------------------------------------------------------- Once integrated, your protocol is automatically available to: * **All LI.FI API integrators** — your vault/staking tokens appear as valid `toToken` destinations * **All LI.FI Widget deployments** — users can select your protocol’s tokens as destinations * **All LI.FI SDK users** — developers can build custom flows targeting your protocol No additional work is required from your side after integration. LI.FI handles the routing, bridging, swapping, and deposit execution. * * * [​](https://docs.li.fi/composer/for-protocols/integration-guide#next-steps) Next Steps ----------------------------------------------------------------------------------------- [Technical Requirements\ ----------------------\ \ Detailed technical requirements for integration](https://docs.li.fi/composer/for-protocols/technical-requirements) [Composer Overview\ -----------------\ \ Learn how Composer works](https://docs.li.fi/composer/overview) [Supported Protocols\ -------------------\ \ See all currently integrated protocols](https://docs.li.fi/composer/reference/supported-protocols) [How It Works\ ------------\ \ Architecture deep-dive](https://docs.li.fi/composer/how-it-works) [Limitations](https://docs.li.fi/composer/reference/limitations) [Technical Requirements](https://docs.li.fi/composer/for-protocols/technical-requirements) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a quote for a token transfer - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Single-step quote Get a quote for a token transfer [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a quote for a token transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/quote/toAmount 200 404 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / quote / toAmount Try it Get a quote for a token transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/quote/toAmount 200 404 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } #### Headers [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-from-chain) fromChain string required The sending chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-to-chain) toChain string required The receiving chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-from-token) fromToken string required The token that should be transferred. Can be the address or the symbol [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-to-token) toToken string required The token that should be transferred to. Can be the address or the symbol [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-from-address) fromAddress string required The sending wallet address [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-to-address) toAddress string The receiving wallet address. If none is provided, the fromAddress will be used [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-to-amount) toAmount string required The amount that will be received including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-order) order enum 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. Available options: `FASTEST`, `CHEAPEST` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-slippage) slippage number The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. Required range: `0 <= x <= 1` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-fee) fee number 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%. Required range: `0 <= x < 1` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-allow-bridges) allowBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-allow-exchanges) allowExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-deny-bridges) denyBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-deny-exchanges) denyExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-prefer-bridges) preferBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-prefer-exchanges) preferExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-allow-destination-call) allowDestinationCall boolean 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`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-max-price-impact) maxPriceImpact number 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%. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-swap-step-timing-strategies) swapStepTimingStrategies string\[\] 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. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#parameter-route-timing-strategies) routeTimingStrategies string\[\] 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. #### Response 200 application/json The step populated with the transaction data Object that represents one step of a `Route` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-id) id string required Unique identifier of the step [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-type) type enum 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. Available options: `swap`, `cross`, `lifi`, `protocol` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-tool) tool string required The tool used for this step. E.g. `relay` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-action) action Root Type for Action · object required The action of the step Show child attributes Example: { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromToken": { "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "chainId": 100, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0.0455272371751059", "logoURI": "" }, "toChainId": 137, "toToken": { "address": "0xc0b2983a17573660053beeed6fdb1053107cf387", "symbol": "MIVA", "decimals": 18, "chainId": 137, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0", "logoURI": "" }, "slippage": 0.003} [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-tool-details) toolDetails object The details of the tool used for this step. E.g. `relay` Show child attributes [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-estimate) estimate Root Type for Estimate · object The estimation for the step Show child attributes Example: { "fromAmount": "1000000000000000000", "toAmount": "999500000000000000", "toAmountMin": "999500000000000000", "tool": "allbridge", "executionDuration": 60, "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.0455272371751059", "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.0455272371751059", "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.0455272371751059", "logoURI": "" }, "amount": "500000000000000", "amountUSD": "22763618587552.95", "included": true } ], "gasCosts": [ { "type": "SEND", "price": "1.22", "estimate": "140000", "limit": "175000", "amount": "170800", "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": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB", "initiator": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "sendingChainId": 100, "sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "amount": "1000000000000000000", "receivingChainId": 137, "receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387", "amountReceived": "999500000000000000", "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "transactionId": "0x9f54c1764e19367c44706f4a6253941b81e9ec524af5590091aa8ae67e7644ed", "expiry": 1643369368, "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "callTo": "0x0000000000000000000000000000000000000000", "encryptedCallData": "0x", "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93", "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113", "bidExpiry": 1643110469 }, "gasFeeInReceivingToken": "0", "totalFee": "500000000000000", "metaTxRelayerFee": "0", "routerFee": "500000000000000" }} [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-included-steps) includedSteps Root Type for Internal Step · object\[\] Show child attributes [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-execution) execution any An objection containing status information about the execution [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1#response-transaction-request) transactionRequest any An ether.js TransactionRequest that can be triggered using a wallet provider. ([https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) ) [Get a quote for a token transfer](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer) [Perform multiple contract calls across blockchains (BETA)](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Data Schemas - LI.FI [Skip to main content](https://docs.li.fi/agents/reference/schemas#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Reference Data Schemas [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Core Types](https://docs.li.fi/agents/reference/schemas#core-types) * [Chain](https://docs.li.fi/agents/reference/schemas#chain) * [Common Chain IDs](https://docs.li.fi/agents/reference/schemas#common-chain-ids) * [Token](https://docs.li.fi/agents/reference/schemas#token) * [Native Token Address](https://docs.li.fi/agents/reference/schemas#native-token-address) * [Common Token Decimals](https://docs.li.fi/agents/reference/schemas#common-token-decimals) * [Quote](https://docs.li.fi/agents/reference/schemas#quote) * [Action](https://docs.li.fi/agents/reference/schemas#action) * [Estimate](https://docs.li.fi/agents/reference/schemas#estimate) * [TransactionRequest](https://docs.li.fi/agents/reference/schemas#transactionrequest) * [Converting Hex Values](https://docs.li.fi/agents/reference/schemas#converting-hex-values) * [Status](https://docs.li.fi/agents/reference/schemas#status) * [Status State Machine](https://docs.li.fi/agents/reference/schemas#status-state-machine) * [Enums](https://docs.li.fi/agents/reference/schemas#enums) * [Order](https://docs.li.fi/agents/reference/schemas#order) * [ChainType](https://docs.li.fi/agents/reference/schemas#chaintype) * [Request Parameter Formats](https://docs.li.fi/agents/reference/schemas#request-parameter-formats) * [Address Format](https://docs.li.fi/agents/reference/schemas#address-format) * [Amount Format](https://docs.li.fi/agents/reference/schemas#amount-format) * [Slippage Format](https://docs.li.fi/agents/reference/schemas#slippage-format) * [Transaction Hash Format](https://docs.li.fi/agents/reference/schemas#transaction-hash-format) * [Validation Rules](https://docs.li.fi/agents/reference/schemas#validation-rules) * [Quote Request](https://docs.li.fi/agents/reference/schemas#quote-request) * [OpenAPI Reference](https://docs.li.fi/agents/reference/schemas#openapi-reference) * [Related Pages](https://docs.li.fi/agents/reference/schemas#related-pages) This page documents the data types, formats, and validation rules for LI.FI API parameters and responses. Use this as a reference for building robust integrations. [​](https://docs.li.fi/agents/reference/schemas#core-types) Core Types ------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/reference/schemas#chain) Chain Represents a blockchain network. Copy Ask AI interface Chain { id: number; // Chain ID (e.g., 1 for Ethereum) key: string; // Short identifier (e.g., "eth") name: string; // Display name (e.g., "Ethereum") chainType: ChainType; // "EVM" | "SVM" | "UTXO" | "MVM" coin: string; // Native token symbol (e.g., "ETH") mainnet: boolean; // true if mainnet logoURI: string; // Chain logo URL metamask?: MetaMaskConfig; } type ChainType = "EVM" | "SVM" | "UTXO" | "MVM"; | Field | Type | Required | Description | | --- | --- | --- | --- | | `id` | integer | Yes | Unique chain identifier | | `key` | string | Yes | Short key (lowercase) | | `name` | string | Yes | Human-readable name | | `chainType` | enum | Yes | Blockchain type | | `coin` | string | Yes | Native token symbol | | `mainnet` | boolean | Yes | Is production network | ### [​](https://docs.li.fi/agents/reference/schemas#common-chain-ids) Common Chain IDs | Chain | ID | Type | | --- | --- | --- | | Ethereum | `1` | EVM | | Arbitrum | `42161` | EVM | | Optimism | `10` | EVM | | Polygon | `137` | EVM | | Base | `8453` | EVM | | Avalanche | `43114` | EVM | | BSC | `56` | EVM | | Solana | `1151111081099710` | SVM | * * * ### [​](https://docs.li.fi/agents/reference/schemas#token) Token Represents a cryptocurrency token. Copy Ask AI interface Token { address: string; // Contract address symbol: string; // Token symbol (e.g., "USDC") name: string; // Full name (e.g., "USD Coin") decimals: number; // Decimal places (e.g., 6) chainId: number; // Chain this token is on priceUSD?: string; // Current USD price logoURI?: string; // Token logo URL } | Field | Type | Required | Format | Description | | --- | --- | --- | --- | --- | | `address` | string | Yes | Hex (0x…) or native | Contract address | | `symbol` | string | Yes | 2-10 chars | Trading symbol | | `decimals` | integer | Yes | 0-18 | Decimal places | | `chainId` | integer | Yes | | Parent chain ID | | `priceUSD` | string | No | Decimal string | USD price | ### [​](https://docs.li.fi/agents/reference/schemas#native-token-address) Native Token Address Copy Ask AI 0x0000000000000000000000000000000000000000 This address represents the native token (ETH, MATIC, etc.) on any EVM chain. ### [​](https://docs.li.fi/agents/reference/schemas#common-token-decimals) Common Token Decimals | Token | Decimals | 1 Token in Wei | | --- | --- | --- | | USDC | 6 | `1000000` | | USDT | 6 | `1000000` | | DAI | 18 | `1000000000000000000` | | WETH | 18 | `1000000000000000000` | | WBTC | 8 | `100000000` | * * * ### [​](https://docs.li.fi/agents/reference/schemas#quote) Quote Response from `/quote` endpoint. Copy Ask AI interface Quote { id: string; // Unique quote identifier type: "lifi"; // Always "lifi" tool: string; // Bridge/DEX used toolDetails: ToolDetails; // Tool metadata action: Action; // Transfer details estimate: Estimate; // Cost and output estimates transactionRequest: TxRequest; // Ready-to-sign transaction } * * * ### [​](https://docs.li.fi/agents/reference/schemas#action) Action Describes what the quote will do. Copy Ask AI interface Action { fromChainId: number; // Source chain toChainId: number; // Destination chain fromToken: Token; // Source token toToken: Token; // Destination token fromAmount: string; // Input amount (smallest unit) slippage: number; // Slippage tolerance (decimal) fromAddress: string; // Sender address toAddress: string; // Recipient address } | Field | Type | Format | Constraints | | --- | --- | --- | --- | | `fromChainId` | integer | | Must be supported chain | | `toChainId` | integer | | Must be supported chain | | `fromAmount` | string | Integer string | \> 0, in smallest unit | | `slippage` | number | Decimal | 0 < slippage < 1 | | `fromAddress` | string | 0x… (42 chars) | Valid address | * * * ### [​](https://docs.li.fi/agents/reference/schemas#estimate) Estimate Cost and output estimates. Copy Ask AI interface Estimate { fromAmount: string; // Input amount toAmount: string; // Expected output amount toAmountMin: string; // Minimum guaranteed (slippage) approvalAddress: string; // Spender for token approval executionDuration: number; // Estimated seconds feeCosts: FeeCost[]; // Protocol fees gasCosts: GasCost[]; // Gas costs } | Field | Type | Description | | --- | --- | --- | | `toAmount` | string | Expected output (optimistic) | | `toAmountMin` | string | Guaranteed minimum (after slippage) | | `approvalAddress` | string | Use for ERC20 `approve()` | | `executionDuration` | integer | Estimated time in seconds | * * * ### [​](https://docs.li.fi/agents/reference/schemas#transactionrequest) TransactionRequest Ready-to-sign transaction data. Copy Ask AI interface TransactionRequest { to: string; // Contract address data: string; // Encoded call data value: string; // Native token amount (hex) gasLimit: string; // Gas limit (hex) gasPrice?: string; // Suggested gas price (hex) chainId: number; // Chain ID for signing } | Field | Type | Format | Description | | --- | --- | --- | --- | | `to` | string | 0x… (42 chars) | Destination contract | | `data` | string | 0x… (hex) | Encoded function call | | `value` | string | 0x… (hex) | Wei amount (hex string) | | `gasLimit` | string | 0x… (hex) | Gas units (hex) | | `chainId` | integer | | EIP-155 chain ID | ### [​](https://docs.li.fi/agents/reference/schemas#converting-hex-values) Converting Hex Values Copy Ask AI // Hex to decimal const gasLimit = parseInt(tx.gasLimit, 16); const value = BigInt(tx.value); // Decimal to hex const hexValue = '0x' + amount.toString(16); * * * ### [​](https://docs.li.fi/agents/reference/schemas#status) Status Transfer status response. Copy Ask AI interface Status { transactionId: string; // Unique transfer ID sending: TransferInfo; // Source chain info receiving?: TransferInfo; // Destination chain info status: StatusType; // Current status substatus?: SubstatusType; // Detailed status (when DONE) tool: string; // Bridge used error?: string; // Error message (if failed) } type StatusType = "NOT_FOUND" | "PENDING" | "DONE" | "FAILED"; type SubstatusType = "COMPLETED" | "PARTIAL" | "REFUNDED"; ### [​](https://docs.li.fi/agents/reference/schemas#status-state-machine) Status State Machine Copy Ask AI NOT_FOUND → PENDING → DONE (COMPLETED | PARTIAL | REFUNDED) ↘ FAILED | Status | Substatus | Meaning | | --- | --- | --- | | `NOT_FOUND` | \- | Transaction not indexed yet | | `PENDING` | \- | Transfer in progress | | `DONE` | `COMPLETED` | Success - got requested token | | `DONE` | `PARTIAL` | Success - got different token | | `DONE` | `REFUNDED` | Failed - tokens returned | | `FAILED` | \- | Permanent failure | * * * [​](https://docs.li.fi/agents/reference/schemas#enums) Enums --------------------------------------------------------------- ### [​](https://docs.li.fi/agents/reference/schemas#order) Order Route ordering preference. Copy Ask AI type Order = "FASTEST" | "CHEAPEST"; | Value | Description | | --- | --- | | `FASTEST` | Lowest execution time | | `CHEAPEST` | Lowest total fees | ### [​](https://docs.li.fi/agents/reference/schemas#chaintype) ChainType Blockchain architecture type. Copy Ask AI type ChainType = "EVM" | "SVM" | "UTXO" | "MVM"; | Value | Description | Examples | | --- | --- | --- | | `EVM` | Ethereum Virtual Machine | Ethereum, Arbitrum, Polygon | | `SVM` | Solana Virtual Machine | Solana | | `UTXO` | Bitcoin-style | Bitcoin | | `MVM` | Move Virtual Machine | Sui | * * * [​](https://docs.li.fi/agents/reference/schemas#request-parameter-formats) Request Parameter Formats ------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/reference/schemas#address-format) Address Format Copy Ask AI Pattern: ^0x[a-fA-F0-9]{40}$ Example: 0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0 ### [​](https://docs.li.fi/agents/reference/schemas#amount-format) Amount Format Amounts are always in the smallest unit (wei for ETH, 6 decimals for USDC): Copy Ask AI Format: String containing non-negative integer Example: "10000000" (10 USDC) ### [​](https://docs.li.fi/agents/reference/schemas#slippage-format) Slippage Format Decimal between 0 and 1: Copy Ask AI Format: Number (decimal) Example: 0.005 (0.5%) Range: 0.001 to 0.5 ### [​](https://docs.li.fi/agents/reference/schemas#transaction-hash-format) Transaction Hash Format Copy Ask AI Pattern: ^0x[a-fA-F0-9]{64}$ Example: 0xabc123...def456 (66 characters total) * * * [​](https://docs.li.fi/agents/reference/schemas#validation-rules) Validation Rules ------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/reference/schemas#quote-request) Quote Request Copy Ask AI const quoteValidation = { fromChain: { type: 'integer', required: true, min: 1 }, toChain: { type: 'integer', required: true, min: 1 }, fromToken: { type: 'string', required: true, pattern: /^(0x[a-fA-F0-9]{40}|[A-Z0-9]+)$/ // Address or symbol }, toToken: { type: 'string', required: true, pattern: /^(0x[a-fA-F0-9]{40}|[A-Z0-9]+)$/ }, fromAmount: { type: 'string', required: true, pattern: /^[0-9]+$/, // Positive integer string min: '1' }, fromAddress: { type: 'string', required: true, pattern: /^0x[a-fA-F0-9]{40}$/ }, slippage: { type: 'number', required: false, default: 0.005, min: 0.001, max: 0.5 } }; * * * [​](https://docs.li.fi/agents/reference/schemas#openapi-reference) OpenAPI Reference --------------------------------------------------------------------------------------- Full OpenAPI specification is available at: * **Spec URL**: `https://li.quest/v1/docs-json` * **Swagger UI**: `https://apidocs.li.fi/` Download and parse the spec for complete schema definitions: Copy Ask AI curl "https://li.quest/v1/docs-json" > lifi-openapi.json * * * [​](https://docs.li.fi/agents/reference/schemas#related-pages) Related Pages ------------------------------------------------------------------------------- * [Endpoint Specifications](https://docs.li.fi/agents/reference/endpoint-specs) - API endpoints * [Concepts](https://docs.li.fi/agents/concepts) - Core concept definitions * [Five-Call Recipe](https://docs.li.fi/agents/quick-start/five-call-recipe) - Example usage [Error Playbooks](https://docs.li.fi/agents/reference/error-playbooks) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Five-Call Recipe - LI.FI [Skip to main content](https://docs.li.fi/agents/quick-start/five-call-recipe#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Quick Start Five-Call Recipe [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [The Five Calls](https://docs.li.fi/agents/quick-start/five-call-recipe#the-five-calls) * [Call 1: Get Supported Chains](https://docs.li.fi/agents/quick-start/five-call-recipe#call-1-get-supported-chains) * [Request](https://docs.li.fi/agents/quick-start/five-call-recipe#request) * [Response](https://docs.li.fi/agents/quick-start/five-call-recipe#response) * [What to Extract](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract) * [Call 2: Get Tokens for Chains](https://docs.li.fi/agents/quick-start/five-call-recipe#call-2-get-tokens-for-chains) * [Request](https://docs.li.fi/agents/quick-start/five-call-recipe#request-2) * [Response](https://docs.li.fi/agents/quick-start/five-call-recipe#response-2) * [What to Extract](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract-2) * [Call 3: Get a Quote](https://docs.li.fi/agents/quick-start/five-call-recipe#call-3-get-a-quote) * [Request](https://docs.li.fi/agents/quick-start/five-call-recipe#request-3) * [Parameters](https://docs.li.fi/agents/quick-start/five-call-recipe#parameters) * [Response](https://docs.li.fi/agents/quick-start/five-call-recipe#response-3) * [What to Extract](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract-3) * [Call 4: Execute the Transaction](https://docs.li.fi/agents/quick-start/five-call-recipe#call-4-execute-the-transaction) * [Approval Check (if ERC20)](https://docs.li.fi/agents/quick-start/five-call-recipe#approval-check-if-erc20) * [Execute Transaction](https://docs.li.fi/agents/quick-start/five-call-recipe#execute-transaction) * [What to Save](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-save) * [Call 5: Poll Transfer Status](https://docs.li.fi/agents/quick-start/five-call-recipe#call-5-poll-transfer-status) * [Request](https://docs.li.fi/agents/quick-start/five-call-recipe#request-4) * [Parameters](https://docs.li.fi/agents/quick-start/five-call-recipe#parameters-2) * [Response](https://docs.li.fi/agents/quick-start/five-call-recipe#response-4) * [Status Values](https://docs.li.fi/agents/quick-start/five-call-recipe#status-values) * [Substatus Values (when DONE)](https://docs.li.fi/agents/quick-start/five-call-recipe#substatus-values-when-done) * [Polling Strategy](https://docs.li.fi/agents/quick-start/five-call-recipe#polling-strategy) * [Complete Flow Diagram](https://docs.li.fi/agents/quick-start/five-call-recipe#complete-flow-diagram) * [Quick Reference](https://docs.li.fi/agents/quick-start/five-call-recipe#quick-reference) This page provides a complete, copy-paste ready workflow for AI agents to execute cross-chain transfers using just 5 API calls. [​](https://docs.li.fi/agents/quick-start/five-call-recipe#the-five-calls) The Five Calls -------------------------------------------------------------------------------------------- Copy Ask AI 1. GET /chains → Discover available chains 2. GET /tokens → Find tokens on those chains 3. GET /quote → Get transfer quote with transaction data 4. [Execute] → Sign and send the transaction 5. GET /status → Poll until transfer completes * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#call-1-get-supported-chains) Call 1: Get Supported Chains ----------------------------------------------------------------------------------------------------------------------- Discover which blockchains LI.FI supports. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#request) Request Copy Ask AI curl "https://li.quest/v1/chains" ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#response) Response Copy Ask AI { "chains": [\ {\ "id": 1,\ "key": "eth",\ "chainType": "EVM",\ "name": "Ethereum",\ "coin": "ETH",\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/ethereum.svg",\ "tokenlistUrl": "https://gateway.ipfs.io/ipns/tokens.uniswap.org",\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0x1",\ "blockExplorerUrls": ["https://etherscan.io/"],\ "chainName": "Ethereum Mainnet",\ "nativeCurrency": {\ "name": "ETH",\ "symbol": "ETH",\ "decimals": 18\ },\ "rpcUrls": ["https://mainnet.infura.io/v3/"]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 1,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27"\ }\ },\ {\ "id": 42161,\ "key": "arb",\ "chainType": "EVM",\ "name": "Arbitrum",\ "coin": "ETH",\ "mainnet": true,\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/chains/arbitrum.svg",\ "tokenlistUrl": "https://bridge.arbitrum.io/token-list-42161.json",\ "multicallAddress": "0xcA11bde05977b3631167028862bE2a173976CA11",\ "metamask": {\ "chainId": "0xa4b1",\ "blockExplorerUrls": ["https://arbiscan.io/"],\ "chainName": "Arbitrum One",\ "nativeCurrency": {\ "name": "ETH",\ "symbol": "ETH",\ "decimals": 18\ },\ "rpcUrls": ["https://arb1.arbitrum.io/rpc"]\ },\ "nativeToken": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 42161,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27"\ }\ }\ // ... 58 chains total (EVM, SVM, UTXO, MVM)\ ] } ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract) What to Extract | Field | Purpose | | --- | --- | | `chains[].id` | Chain ID for use in all other API calls | | `chains[].key` | Short identifier (e.g., “eth”, “arb”, “pol”) | | `chains[].chainType` | Filter by EVM, SVM (Solana), UTXO (Bitcoin), MVM (Sui) | | `chains[].mainnet` | true for mainnets, false for testnets | | `chains[].nativeToken` | Native gas token details | | `chains[].metamask` | Chain config for wallet connection | * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#call-2-get-tokens-for-chains) Call 2: Get Tokens for Chains ------------------------------------------------------------------------------------------------------------------------- Find which tokens are available on specific chains. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#request-2) Request Copy Ask AI curl "https://li.quest/v1/tokens?chains=1,42161" ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#response-2) Response Copy Ask AI { "tokens": { "1": [\ {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 1,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27"\ },\ {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ {\ "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",\ "chainId": 1,\ "symbol": "USDT",\ "decimals": 6,\ "name": "Tether USD",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00",\ "tags": ["stablecoin"]\ }\ // ... 500+ more tokens on Ethereum\ ], "42161": [\ {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 42161,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27"\ },\ {\ "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",\ "chainId": 42161,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ {\ "address": "0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9",\ "chainId": 42161,\ "symbol": "USDT",\ "decimals": 6,\ "name": "Tether USD",\ "coinKey": "USDT",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xdAC17F958D2ee523a2206206994597C13D831ec7/logo.png",\ "priceUSD": "1.00",\ "tags": ["stablecoin"]\ }\ // ... 200+ more tokens on Arbitrum\ ] } } ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract-2) What to Extract | Field | Purpose | | --- | --- | | `tokens[chainId][].address` | Token contract address (use in quote) | | `tokens[chainId][].symbol` | Human-readable symbol | | `tokens[chainId][].decimals` | For converting human amounts to smallest units | | `tokens[chainId][].priceUSD` | Current USD price | | `tokens[chainId][].coinKey` | Canonical token identifier across chains | | `tokens[chainId][].tags` | Token categories (e.g., “stablecoin”) | You can use token symbols (e.g., `USDC`) instead of addresses in the quote request - the API resolves them automatically. * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#call-3-get-a-quote) Call 3: Get a Quote ----------------------------------------------------------------------------------------------------- Request a quote for the transfer. This returns transaction data ready to execute. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#request-3) Request Copy Ask AI curl "https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=10000000&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#parameters) Parameters | Parameter | Required | Description | | --- | --- | --- | | `fromChain` | Yes | Source chain ID (e.g., `1`) | | `toChain` | Yes | Destination chain ID (e.g., `42161`) | | `fromToken` | Yes | Source token address or symbol | | `toToken` | Yes | Destination token address or symbol | | `fromAmount` | Yes | Amount in smallest unit (e.g., `10000000` = 10 USDC) | | `fromAddress` | Yes | Sender wallet address | | `toAddress` | No | Recipient address (defaults to `fromAddress`) | | `slippage` | No | Max slippage as decimal (default: `0.005` = 0.5%) | ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#response-3) Response Copy Ask AI { "type": "lifi", "id": "9f32864e-d704-46c1-874e-20f492c0ce77:0", "tool": "across", "toolDetails": { "key": "across", "name": "AcrossV4", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg" }, "action": { "fromToken": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606", "tags": ["stablecoin"] }, "fromAmount": "10000000", "toToken": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chainId": 42161, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606", "tags": ["stablecoin"] }, "fromChainId": 1, "toChainId": 42161, "slippage": 0.001, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "tool": "across", "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "toAmountMin": "9965731", "toAmount": "9965731", "fromAmount": "10000000", "feeCosts": [\ {\ "name": "LIFI Fixed Fee",\ "description": "Fixed LIFI fee, independent of any other fee",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "25000",\ "amountUSD": "0.0250",\ "percentage": "0.0025",\ "included": true,\ "feeSplit": {\ "integratorFee": "0",\ "lifiFee": "25000"\ }\ },\ {\ "name": "Relayer fee",\ "description": "The fee taken by the relayer",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "997",\ "amountUSD": "0.0010",\ "percentage": "0.000100",\ "included": true\ },\ {\ "name": "Relayer gas fee",\ "description": "The gas fee taken by the relayer",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "8272",\ "amountUSD": "0.0083",\ "percentage": "0.000829",\ "included": true\ }\ ], "gasCosts": [\ {\ "type": "SEND",\ "price": "65729222",\ "estimate": "220266",\ "limit": "286346",\ "amount": "14477912813052",\ "amountUSD": "0.0423",\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 1,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27",\ "tags": ["major_asset"]\ }\ }\ ], "executionDuration": 4, "fromAmountUSD": "9.9961", "toAmountUSD": "9.9618" }, "includedSteps": [\ {\ "id": "e1c87be5-80be-4e2d-8c96-a6492566a739",\ "type": "protocol",\ "action": {\ "fromChainId": 1,\ "fromAmount": "10000000",\ "fromToken": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "toChainId": 1,\ "toToken": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "slippage": 0.001,\ "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",\ "toAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE"\ },\ "estimate": {\ "fromAmount": "10000000",\ "toAmount": "9975000",\ "toAmountMin": "9975000",\ "tool": "feeCollection",\ "approvalAddress": "0x3Ef238c36035880EfbDfa239d218186b79Ad1d6F",\ "gasCosts": [\ {\ "type": "SEND",\ "price": "65729222",\ "estimate": "130000",\ "limit": "169000",\ "amount": "8544798860000",\ "amountUSD": "0.0250",\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 1,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27",\ "tags": ["major_asset"]\ }\ }\ ],\ "feeCosts": [\ {\ "name": "LIFI Fixed Fee",\ "description": "Fixed LIFI fee, independent of any other fee",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "25000",\ "amountUSD": "0.0250",\ "percentage": "0.0025",\ "included": true,\ "feeSplit": {\ "integratorFee": "0",\ "lifiFee": "25000"\ }\ }\ ],\ "executionDuration": 0\ },\ "tool": "feeCollection",\ "toolDetails": {\ "key": "feeCollection",\ "name": "Integrator Fee",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/protocols/feeCollection.svg"\ }\ },\ {\ "id": "529839e7-a048-4abe-99ad-d650a0fe469e",\ "type": "cross",\ "action": {\ "fromChainId": 1,\ "fromAmount": "9975000",\ "fromToken": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "toChainId": 42161,\ "toToken": {\ "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",\ "chainId": 42161,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "slippage": 0.001,\ "fromAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "destinationGasConsumption": "0"\ },\ "estimate": {\ "fromAmount": "9975000",\ "toAmount": "9965731",\ "toAmountMin": "9965731",\ "approvalAddress": "0x5c7BCd6E7De5423a257D81B442095A1a6ced35C5",\ "executionDuration": 4,\ "feeCosts": [\ {\ "name": "Relayer fee",\ "description": "The fee taken by the relayer",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "997",\ "amountUSD": "0.0010",\ "percentage": "0.000100",\ "included": true\ },\ {\ "name": "Relayer gas fee",\ "description": "The gas fee taken by the relayer",\ "token": {\ "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",\ "chainId": 1,\ "symbol": "USDC",\ "decimals": 6,\ "name": "USD Coin",\ "coinKey": "USDC",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",\ "priceUSD": "0.999606",\ "tags": ["stablecoin"]\ },\ "amount": "8272",\ "amountUSD": "0.0083",\ "percentage": "0.000829",\ "included": true\ }\ ],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "65729222",\ "estimate": "86000",\ "limit": "111800",\ "amount": "5652713092000",\ "amountUSD": "0.0165",\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "chainId": 1,\ "symbol": "ETH",\ "decimals": 18,\ "name": "ETH",\ "coinKey": "ETH",\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2/logo.png",\ "priceUSD": "2923.27",\ "tags": ["major_asset"]\ }\ }\ ],\ "tool": "across"\ },\ "tool": "across",\ "toolDetails": {\ "key": "across",\ "name": "AcrossV4",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg"\ }\ }\ ], "integrator": "lifi-api", "transactionRequest": { "value": "0x0", "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "data": "0x1794958f0000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000004001695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000001800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000552008c0f6870c2f77e5cc1d2eb9bdff03e30ea000000000000000000000000000000000000000000000000000000000009834d8000000000000000000000000000000000000000000000000000000000000a4b10000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000066163726f7373000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000086c6966692d617069000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000003ef238c36035880efbdfa239d218186b79ad1d6f0000000000000000000000003ef238c36035880efbdfa239d218186b79ad1d6f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000098968000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000084eedd56e1000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000061a8000000000000000000000000b9c0de368bece5e76b52545a8e377a4c118f597b00000000000000000000000000000000000000000000000000000000000000000000000000000000552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0000000000000000000000000552008c0f6870c2f77e5cc1d2eb9bdff03e30ea0000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000af88d065e77c8cc2239327c5edb3a432268e583100000000000000000000000000000000000000000000000000000000009810a30000000000000000000000000000000000000000000000000ddd69940d1f65b200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000069734fab00000000000000000000000000000000000000000000000000000000697373ed000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000000", "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "chainId": 1, "gasPrice": "0x3eaf2c6", "gasLimit": "0x45e8a" }, "transactionId": "0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8" } ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-extract-3) What to Extract | Field | Purpose | | --- | --- | | `tool` | Bridge/DEX used (needed for status check) | | `estimate.toAmount` | Expected output amount | | `estimate.toAmountMin` | Minimum guaranteed (slippage protected) | | `estimate.approvalAddress` | Spender address for token approval (if ERC20) | | `estimate.executionDuration` | Estimated time in seconds | | `estimate.feeCosts` | Array of protocol fees | | `estimate.gasCosts` | Array of gas costs | | `includedSteps` | Detailed breakdown of each step in the transfer | | `transactionRequest` | Ready-to-sign transaction object | | `transactionId` | Unique identifier for tracking this transfer | * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#call-4-execute-the-transaction) Call 4: Execute the Transaction ----------------------------------------------------------------------------------------------------------------------------- Before executing, ensure the user has approved the token transfer if using an ERC20 token. Check if `fromToken` is native (ETH) or ERC20, and verify allowance. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#approval-check-if-erc20) Approval Check (if ERC20) If `fromToken.address` is NOT `0x0000000000000000000000000000000000000000`: 1. Call `allowance(fromAddress, approvalAddress)` on the token contract 2. If allowance < fromAmount, send an `approve(approvalAddress, amount)` transaction first ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#execute-transaction) Execute Transaction Sign and send the `transactionRequest` object from the quote response: Copy Ask AI // The transactionRequest is ready to use const tx = { to: quote.transactionRequest.to, data: quote.transactionRequest.data, value: quote.transactionRequest.value, gasLimit: quote.transactionRequest.gasLimit, chainId: quote.transactionRequest.chainId }; // Sign and send with user's wallet const txResponse = await wallet.sendTransaction(tx); const txHash = txResponse.hash; ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#what-to-save) What to Save * `txHash` - Transaction hash for status polling (required) * `fromChain` - Source chain ID (optional, speeds up status check) * `toChain` - Destination chain ID (optional) * `tool` - From the quote response (optional) * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#call-5-poll-transfer-status) Call 5: Poll Transfer Status ----------------------------------------------------------------------------------------------------------------------- Check the status of the cross-chain transfer until it completes. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#request-4) Request Copy Ask AI curl "https://li.quest/v1/status?txHash=0xabc123...&bridge=stargate&fromChain=1&toChain=42161" ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#parameters-2) Parameters | Parameter | Required | Description | | --- | --- | --- | | `txHash` | Yes | Transaction hash from step 4 | | `fromChain` | No | Source chain ID (recommended for faster response) | | `toChain` | No | Destination chain ID | | `bridge` | No | The `tool` value from the quote | Only `txHash` is required. The other parameters are optional but providing `fromChain` speeds up the request. ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#response-4) Response Copy Ask AI { "transactionId": "0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "sending": { "txHash": "0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "txLink": "https://etherscan.io/tx/0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "chainId": 1, "amount": "10000000", "token": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606" }, "amountUSD": "9.9961", "gasPrice": "65729222", "gasUsed": "220266", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 1, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "priceUSD": "2923.27" }, "gasAmount": "14477912813052", "gasAmountUSD": "0.0423", "timestamp": 1737625200 }, "receiving": { "txHash": "0xdef456789abc...", "txLink": "https://arbiscan.io/tx/0xdef456789abc...", "chainId": 42161, "amount": "9965731", "token": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chainId": 42161, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606" }, "amountUSD": "9.9618", "timestamp": 1737625204 }, "lifiExplorerLink": "https://explorer.li.fi/tx/0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "tool": "across", "status": "DONE", "substatus": "COMPLETED" } ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#status-values) Status Values | Status | Action | | --- | --- | | `NOT_FOUND` | Transaction not indexed yet, keep polling | | `PENDING` | Transfer in progress, keep polling | | `DONE` | Transfer complete, check `substatus` | | `FAILED` | Transfer failed, check error | ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#substatus-values-when-done) Substatus Values (when DONE) | Substatus | Meaning | | --- | --- | | `COMPLETED` | Success - user received exact requested tokens | | `PARTIAL` | Success - user received different token (full value) | | `REFUNDED` | Failed - tokens returned to sender | ### [​](https://docs.li.fi/agents/quick-start/five-call-recipe#polling-strategy) Polling Strategy Copy Ask AI const pollStatus = async (txHash, bridge, fromChain, toChain) => { const maxAttempts = 60; let attempt = 0; while (attempt < maxAttempts) { const response = await fetch( `https://li.quest/v1/status?txHash=${txHash}&bridge=${bridge}&fromChain=${fromChain}&toChain=${toChain}` ); const status = await response.json(); if (status.status === 'DONE' || status.status === 'FAILED') { return status; } // Wait 10 seconds before next poll await new Promise(resolve => setTimeout(resolve, 10000)); attempt++; } throw new Error('Status polling timeout'); }; * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#complete-flow-diagram) Complete Flow Diagram ---------------------------------------------------------------------------------------------------------- Copy Ask AI ┌─────────────────────────────────────────────────────────────────┐ │ AGENT WORKFLOW │ ├─────────────────────────────────────────────────────────────────┤ │ │ │ 1. GET /chains ──────────────────────► List of chain IDs │ │ │ │ 2. GET /tokens?chains=X,Y ───────────► Token addresses │ │ │ │ 3. GET /quote?fromChain=X&... ───────► transactionRequest │ │ │ │ │ ▼ │ │ 4. [Check if ERC20] │ │ │ │ │ ├── Native token ──► Skip approval │ │ │ │ │ └── ERC20 ──► Check allowance │ │ │ │ │ └── If insufficient ──► Send approve() tx │ │ │ │ 5. Sign & send transactionRequest ───► txHash │ │ │ │ 6. GET /status?txHash=X&... ─────────► Poll until DONE │ │ │ │ │ ├── PENDING ──► Keep polling │ │ │ │ │ ├── DONE + COMPLETED ──► Success! │ │ │ │ │ ├── DONE + PARTIAL ──► Success (different token) │ │ │ │ │ └── FAILED ──► Handle error │ │ │ └─────────────────────────────────────────────────────────────────┘ * * * [​](https://docs.li.fi/agents/quick-start/five-call-recipe#quick-reference) Quick Reference ---------------------------------------------------------------------------------------------- Copy Ask AI # 1. Get chains curl "https://li.quest/v1/chains" # 2. Get tokens for Ethereum and Arbitrum curl "https://li.quest/v1/tokens?chains=1,42161" # 3. Get quote for 10 USDC from Ethereum to Arbitrum (replace address with your own) curl "https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=10000000&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" # 4. Execute transactionRequest with user's wallet # 5. Check status curl "https://li.quest/v1/status?txHash=TX_HASH&bridge=TOOL&fromChain=1&toChain=42161" [Concepts and Objects](https://docs.li.fi/agents/concepts) [Decision Tables](https://docs.li.fi/agents/quick-start/decision-tables) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a set of routes for a request that describes a transfer of tokens - LI.FI [Skip to main content](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Advanced routes Get a set of routes for a request that describes a transfer of tokens [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a set of routes for a request that describes a transfer of tokens cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/advanced/routes \ --header 'Content-Type: application/json' \ --data ' { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromTokenAddress": "0x0000000000000000000000000000000000000000", "toChainId": 137, "toTokenAddress": "0x0000000000000000000000000000000000000000", "options": { "integrator": "fee-demo", "referrer": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "slippage": 0.003, "fee": 0.02, "bridges": { "allow": [\ "relay"\ ] }, "exchanges": { "allow": [\ "1inch",\ "openocean"\ ] }, "allowSwitchChain": true, "order": "CHEAPEST", "maxPriceImpact": 0.1 } } ' 200 Copy Ask AI { "routes": [\ {\ "id": "0x1e21fad9c26fff48b67ae2925f878e43bf81211da8b1cd9b7faa8bfd8d7ea9d9",\ "fromChainId": 100,\ "fromAmountUSD": "0.05",\ "fromAmount": "1000000000000000000",\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toChainId": 137,\ "toAmountUSD": "0.00",\ "toAmount": "999500000000000000",\ "toAmountMin": "999500000000000000",\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasCostUSD": "0.00",\ "steps": [\ {\ "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": "22737686383756.59",\ "included": true\ }\ ],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "140000",\ "limit": "175000",\ "amount": "176400",\ "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"\ }\ ]\ },\ {\ "id": "0xb785f52e68f8a6fb147d5e392e06f122c1a418be84bdc28de0f311b91fa5e57e",\ "fromChainId": 100,\ "fromAmountUSD": "0.05",\ "fromAmount": "1000000000000000000",\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toChainId": 137,\ "toAmountUSD": "0.00",\ "toAmount": "941511949935063841",\ "toAmountMin": "913266591437011926",\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasCostUSD": "0.10",\ "steps": [\ {\ "id": "ea5abad4-2e2a-476f-981d-797816e5cc77",\ "type": "swap",\ "tool": "1inch",\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "809146346742",\ "toAmountMin": "784871956340",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "252364",\ "limit": "315455",\ "amount": "317979",\ "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": {\ "fromToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toToken": {\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61",\ "decimals": 18,\ "symbol": "FRACTION",\ "name": "Own a fraction",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toTokenAmount": "809146346742",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ [\ [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "toTokenAddress": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ }\ ]\ ]\ ],\ "estimatedGas": 252364\ }\ },\ "integrator": "fee-demo"\ },\ {\ "id": "0x85e93238e8f2f83dd5840eb748c7b9099d69e1ea227a13e7a2e949cf6a32ab7d",\ "type": "cross",\ "tool": "relay",\ "action": {\ "fromChainId": 100,\ "toChainId": 137,\ "fromToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "toToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 137,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4"\ },\ "fromAmount": "784871956340",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "784871956340",\ "toAmount": "784479520361",\ "toAmountMin": "784479520361",\ "approvalAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",\ "feeCosts": [\ {\ "name": "Gas Fee",\ "description": "Covers gas expense for sending funds to user on receiving chain.",\ "percentage": "0",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "0",\ "amountUSD": "0.00",\ "included": true\ },\ {\ "name": "Relay Fee",\ "description": "Covers gas expense for claiming user funds on receiving chain.",\ "percentage": "0",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "0",\ "amountUSD": "0.00",\ "included": true\ },\ {\ "name": "Router Fee",\ "description": "Router service fee.",\ "percentage": "0.00050000000105749733",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "392435979",\ "amountUSD": "0.00",\ "included": true\ }\ ],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "140000",\ "limit": "175000",\ "amount": "176400",\ "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": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61",\ "amount": "784871956340",\ "receivingChainId": 137,\ "receivingAssetId": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "amountReceived": "784479520361",\ "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",\ "transactionId": "0x85e93238e8f2f83dd5840eb748c7b9099d69e1ea227a13e7a2e949cf6a32ab7d",\ "expiry": 1643364189,\ "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",\ "callTo": "0x0000000000000000000000000000000000000000",\ "encryptedCallData": "0x",\ "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",\ "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113",\ "bidExpiry": 1643105290\ },\ "gasFeeInReceivingToken": "0",\ "totalFee": "392435979",\ "metaTxRelayerFee": "0",\ "routerFee": "392435979"\ }\ },\ "integrator": "fee-demo"\ },\ {\ "id": "d8686af1-c131-4566-bf4a-ef8226f9879b",\ "type": "swap",\ "tool": "1inch",\ "action": {\ "fromChainId": 137,\ "toChainId": 137,\ "fromToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 137,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4"\ },\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "fromAmount": "784479520361",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "784479520361",\ "toAmount": "941511949935063841",\ "toAmountMin": "913266591437011926",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "129",\ "estimate": "549386",\ "limit": "686733",\ "amount": "70870794",\ "amountUSD": "0.10",\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "1.469213",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/e5a8a2860ba5cf740a474dcab796dc63.png"\ }\ }\ ],\ "data": {\ "fromToken": {\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "decimals": 18,\ "symbol": "FRACTION",\ "name": "Own a fraction",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "decimals": 18,\ "symbol": "MIVA",\ "name": "Minerva Wallet SuperToken",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toTokenAmount": "941511949935063841",\ "fromTokenAmount": "784479520361",\ "protocols": [\ [\ [\ {\ "name": "POLYGON_QUICKSWAP",\ "part": 100,\ "fromTokenAddress": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "toTokenAddress": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"\ }\ ],\ [\ {\ "name": "POLYDEX_FINANCE",\ "part": 100,\ "fromTokenAddress": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",\ "toTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"\ }\ ],\ [\ {\ "name": "POLYGON_QUICKSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0xc0b2983a17573660053beeed6fdb1053107cf387"\ }\ ]\ ]\ ],\ "estimatedGas": 549386\ }\ },\ "integrator": "fee-demo"\ }\ ]\ }\ ], "errors": [\ {\ "errorType": "NO_QUOTE",\ "code": "NO_POSSIBLE_ROUTE",\ "action": {\ "fromChainId": 42161,\ "toChainId": 42161,\ "fromToken": {\ "address": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",\ "decimals": 6,\ "symbol": "USDC",\ "coinKey": "USDC",\ "chainId": 42161,\ "name": "USDC",\ "logoURI": "http://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png\",",\ "priceUSD": "1.001"\ },\ "toToken": {\ "address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",\ "decimals": 6,\ "symbol": "USDT",\ "coinKey": "USDT",\ "chainId": 42161,\ "name": "Tether USD",\ "logoURI": "http://get.celer.app/cbridge-icons/USDT.png\""\ },\ "fromAmount": "100000",\ "slippage": 0.003\ }\ }\ ] } POST https://li.questhttps://staging.li.quest / v1 / advanced / routes Try it Get a set of routes for a request that describes a transfer of tokens cURL Copy Ask AI curl --request POST \ --url https://li.quest/v1/advanced/routes \ --header 'Content-Type: application/json' \ --data ' { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromTokenAddress": "0x0000000000000000000000000000000000000000", "toChainId": 137, "toTokenAddress": "0x0000000000000000000000000000000000000000", "options": { "integrator": "fee-demo", "referrer": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "slippage": 0.003, "fee": 0.02, "bridges": { "allow": [\ "relay"\ ] }, "exchanges": { "allow": [\ "1inch",\ "openocean"\ ] }, "allowSwitchChain": true, "order": "CHEAPEST", "maxPriceImpact": 0.1 } } ' 200 Copy Ask AI { "routes": [\ {\ "id": "0x1e21fad9c26fff48b67ae2925f878e43bf81211da8b1cd9b7faa8bfd8d7ea9d9",\ "fromChainId": 100,\ "fromAmountUSD": "0.05",\ "fromAmount": "1000000000000000000",\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toChainId": 137,\ "toAmountUSD": "0.00",\ "toAmount": "999500000000000000",\ "toAmountMin": "999500000000000000",\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasCostUSD": "0.00",\ "steps": [\ {\ "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": "22737686383756.59",\ "included": true\ }\ ],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "140000",\ "limit": "175000",\ "amount": "176400",\ "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"\ }\ ]\ },\ {\ "id": "0xb785f52e68f8a6fb147d5e392e06f122c1a418be84bdc28de0f311b91fa5e57e",\ "fromChainId": 100,\ "fromAmountUSD": "0.05",\ "fromAmount": "1000000000000000000",\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toChainId": 137,\ "toAmountUSD": "0.00",\ "toAmount": "941511949935063841",\ "toAmountMin": "913266591437011926",\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "gasCostUSD": "0.10",\ "steps": [\ {\ "id": "ea5abad4-2e2a-476f-981d-797816e5cc77",\ "type": "swap",\ "tool": "1inch",\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0.04547537276751318",\ "logoURI": ""\ },\ "toToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "809146346742",\ "toAmountMin": "784871956340",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "252364",\ "limit": "315455",\ "amount": "317979",\ "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": {\ "fromToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toToken": {\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61",\ "decimals": 18,\ "symbol": "FRACTION",\ "name": "Own a fraction",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toTokenAmount": "809146346742",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ [\ [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "toTokenAddress": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ }\ ]\ ]\ ],\ "estimatedGas": 252364\ }\ },\ "integrator": "fee-demo"\ },\ {\ "id": "0x85e93238e8f2f83dd5840eb748c7b9099d69e1ea227a13e7a2e949cf6a32ab7d",\ "type": "cross",\ "tool": "relay",\ "action": {\ "fromChainId": 100,\ "toChainId": 137,\ "fromToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "toToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 137,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4"\ },\ "fromAmount": "784871956340",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "784871956340",\ "toAmount": "784479520361",\ "toAmountMin": "784479520361",\ "approvalAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",\ "feeCosts": [\ {\ "name": "Gas Fee",\ "description": "Covers gas expense for sending funds to user on receiving chain.",\ "percentage": "0",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "0",\ "amountUSD": "0.00",\ "included": true\ },\ {\ "name": "Relay Fee",\ "description": "Covers gas expense for claiming user funds on receiving chain.",\ "percentage": "0",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "0",\ "amountUSD": "0.00",\ "included": true\ },\ {\ "name": "Router Fee",\ "description": "Router service fee.",\ "percentage": "0.00050000000105749733",\ "token": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61"\ },\ "amount": "392435979",\ "amountUSD": "0.00",\ "included": true\ }\ ],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1.26",\ "estimate": "140000",\ "limit": "175000",\ "amount": "176400",\ "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": "0x2bf2ba13735160624a0feae98f6ac8f70885ea61",\ "amount": "784871956340",\ "receivingChainId": 137,\ "receivingAssetId": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "amountReceived": "784479520361",\ "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E",\ "transactionId": "0x85e93238e8f2f83dd5840eb748c7b9099d69e1ea227a13e7a2e949cf6a32ab7d",\ "expiry": 1643364189,\ "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470",\ "callTo": "0x0000000000000000000000000000000000000000",\ "encryptedCallData": "0x",\ "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93",\ "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113",\ "bidExpiry": 1643105290\ },\ "gasFeeInReceivingToken": "0",\ "totalFee": "392435979",\ "metaTxRelayerFee": "0",\ "routerFee": "392435979"\ }\ },\ "integrator": "fee-demo"\ },\ {\ "id": "d8686af1-c131-4566-bf4a-ef8226f9879b",\ "type": "swap",\ "tool": "1inch",\ "action": {\ "fromChainId": 137,\ "toChainId": 137,\ "fromToken": {\ "name": "Own a fraction",\ "symbol": "FRACTION",\ "coinKey": "FRACTION",\ "decimals": 18,\ "chainId": 137,\ "logoURI": "https://assets.coingecko.com/coins/images/15099/large/fraction.png?1619691519",\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4"\ },\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "symbol": "MIVA",\ "decimals": 18,\ "chainId": 137,\ "name": "Minerva Wallet SuperToken",\ "coinKey": "MIVA",\ "priceUSD": "0",\ "logoURI": ""\ },\ "fromAmount": "784479520361",\ "slippage": 0.003\ },\ "estimate": {\ "fromAmount": "784479520361",\ "toAmount": "941511949935063841",\ "toAmountMin": "913266591437011926",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "129",\ "estimate": "549386",\ "limit": "686733",\ "amount": "70870794",\ "amountUSD": "0.10",\ "token": {\ "address": "0x0000000000000000000000000000000000000000",\ "symbol": "MATIC",\ "decimals": 18,\ "chainId": 137,\ "name": "MATIC",\ "coinKey": "MATIC",\ "priceUSD": "1.469213",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/matic/e5a8a2860ba5cf740a474dcab796dc63.png"\ }\ }\ ],\ "data": {\ "fromToken": {\ "address": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "decimals": 18,\ "symbol": "FRACTION",\ "name": "Own a fraction",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toToken": {\ "address": "0xc0b2983a17573660053beeed6fdb1053107cf387",\ "decimals": 18,\ "symbol": "MIVA",\ "name": "Minerva Wallet SuperToken",\ "logoURI": "https://etherscan.io/images/main/empty-token.png",\ "isCustom": true\ },\ "toTokenAmount": "941511949935063841",\ "fromTokenAmount": "784479520361",\ "protocols": [\ [\ [\ {\ "name": "POLYGON_QUICKSWAP",\ "part": 100,\ "fromTokenAddress": "0xbd80cfa9d93a87d1bb895f810ea348e496611cd4",\ "toTokenAddress": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619"\ }\ ],\ [\ {\ "name": "POLYDEX_FINANCE",\ "part": 100,\ "fromTokenAddress": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",\ "toTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"\ }\ ],\ [\ {\ "name": "POLYGON_QUICKSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0xc0b2983a17573660053beeed6fdb1053107cf387"\ }\ ]\ ]\ ],\ "estimatedGas": 549386\ }\ },\ "integrator": "fee-demo"\ }\ ]\ }\ ], "errors": [\ {\ "errorType": "NO_QUOTE",\ "code": "NO_POSSIBLE_ROUTE",\ "action": {\ "fromChainId": 42161,\ "toChainId": 42161,\ "fromToken": {\ "address": "0xff970a61a04b1ca14834a43f5de4533ebddb5cc8",\ "decimals": 6,\ "symbol": "USDC",\ "coinKey": "USDC",\ "chainId": 42161,\ "name": "USDC",\ "logoURI": "http://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png\",",\ "priceUSD": "1.001"\ },\ "toToken": {\ "address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",\ "decimals": 6,\ "symbol": "USDT",\ "coinKey": "USDT",\ "chainId": 42161,\ "name": "Tether USD",\ "logoURI": "http://get.celer.app/cbridge-icons/USDT.png\""\ },\ "fromAmount": "100000",\ "slippage": 0.003\ }\ }\ ] } Need opinionated routing defaults? Include `options.preset` in the request body and review the [API presets overview](https://docs.li.fi/api-reference/presets/overview) for the supported configurations. #### Headers [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Body application/json The request object describes a desired any-to-any transfer and contains all information necessary to calculate the most efficient routes. A description of a token transfer [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-from-chain-id) fromChainId number required The sending chain id [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-from-amount) fromAmount string required The amount that should be transferred including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-from-token-address) fromTokenAddress string required The address of the sending `Token` [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-to-chain-id) toChainId number required The id of the receiving chain [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-to-token-address) toTokenAddress string required The address of the receiving `Token` [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-options) options Root Type for RouteOptions · object Optional configuration for the routes Show child attributes Example: { "integrator": "fee-demo", "slippage": 0.003, "fee": 0.02, "bridges": { "allow": ["relay"] }, "exchanges": { "allow": ["1inch", "openocean"] }, "maxPriceImpact": 0.1} [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-from-address) fromAddress string The sending wallet address [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-to-address) toAddress string The receiving wallet address [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#body-from-amount-for-gas) fromAmountForGas string The amount of the token to convert to gas on the destination side. #### Response 200 application/json The resulting routes that can be used to realize the described transfer of tokens A list of routes that can be used to realize the described transfer of tokens [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#response-routes) routes Root Type for Route · object\[\] required List of possible `Routes` for the given transfer Show child attributes [​](https://docs.li.fi/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens#response-unavailable-routes) unavailableRoutes object\[\] An object representing the routes that are unavailable for the given transfer Show child attributes [Perform multiple contract calls across blockchains (BETA)](https://docs.li.fi/api-reference/perform-multiple-contract-calls-across-blockchains-beta) [Populate a step with transaction data](https://docs.li.fi/api-reference/advanced/populate-a-step-with-transaction-data) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Error Playbooks - LI.FI [Skip to main content](https://docs.li.fi/agents/reference/error-playbooks#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Reference Error Playbooks [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [HTTP Status Codes](https://docs.li.fi/agents/reference/error-playbooks#http-status-codes) * [400 Bad Request](https://docs.li.fi/agents/reference/error-playbooks#400-bad-request) * [404 Not Found](https://docs.li.fi/agents/reference/error-playbooks#404-not-found) * [429 Too Many Requests](https://docs.li.fi/agents/reference/error-playbooks#429-too-many-requests) * [500 Internal Server Error](https://docs.li.fi/agents/reference/error-playbooks#500-internal-server-error) * [503 Service Unavailable](https://docs.li.fi/agents/reference/error-playbooks#503-service-unavailable) * [API Error Codes](https://docs.li.fi/agents/reference/error-playbooks#api-error-codes) * [NO\_POSSIBLE\_ROUTE](https://docs.li.fi/agents/reference/error-playbooks#no_possible_route) * [AMOUNT\_TOO\_LOW](https://docs.li.fi/agents/reference/error-playbooks#amount_too_low) * [AMOUNT\_TOO\_HIGH](https://docs.li.fi/agents/reference/error-playbooks#amount_too_high) * [INSUFFICIENT\_LIQUIDITY](https://docs.li.fi/agents/reference/error-playbooks#insufficient_liquidity) * [Slippage Error (code 1007)](https://docs.li.fi/agents/reference/error-playbooks#slippage-error-code-1007) * [TOOL\_TIMEOUT](https://docs.li.fi/agents/reference/error-playbooks#tool_timeout) * [CHAIN\_NOT\_SUPPORTED](https://docs.li.fi/agents/reference/error-playbooks#chain_not_supported) * [TOKEN\_NOT\_SUPPORTED](https://docs.li.fi/agents/reference/error-playbooks#token_not_supported) * [Transaction Errors](https://docs.li.fi/agents/reference/error-playbooks#transaction-errors) * [execution reverted](https://docs.li.fi/agents/reference/error-playbooks#execution-reverted) * [insufficient funds](https://docs.li.fi/agents/reference/error-playbooks#insufficient-funds) * [user rejected](https://docs.li.fi/agents/reference/error-playbooks#user-rejected) * [nonce too low](https://docs.li.fi/agents/reference/error-playbooks#nonce-too-low) * [Error Handling Template](https://docs.li.fi/agents/reference/error-playbooks#error-handling-template) * [Quick Reference](https://docs.li.fi/agents/reference/error-playbooks#quick-reference) * [Related Pages](https://docs.li.fi/agents/reference/error-playbooks#related-pages) This page provides actionable playbooks for handling errors from the LI.FI API. For each error, you’ll find the cause, whether to retry, what to change, and how to communicate with users. [​](https://docs.li.fi/agents/reference/error-playbooks#http-status-codes) HTTP Status Codes ----------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/reference/error-playbooks#400-bad-request) 400 Bad Request **Cause**: Invalid parameters in the request. | Retry? | No | | --- | --- | | **Fix** | Check and correct request parameters | | **User Message** | ”Invalid request. Please check your input and try again.” | **Common Causes**: * Missing required parameters * Invalid token address format * Invalid chain ID * Amount is 0 or negative * fromAddress not a valid address Copy Ask AI // Example handling if (error.status === 400) { console.error('Bad request:', error.message); // Parse error message for specific field // Don't retry - fix parameters } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#404-not-found) 404 Not Found **Cause**: No route available for the requested transfer. | Retry? | Maybe - with different parameters | | --- | --- | | **Fix** | Try different token pair, smaller amount, or different chains | | **User Message** | ”No route found for this transfer. Try a different token or amount.” | **Common Causes**: * Token pair not supported * Amount too small (below minimum) * Amount too large (exceeds liquidity) * Bridge temporarily unavailable Copy Ask AI if (error.status === 404 || error.message.includes('No route')) { // Suggest alternatives const suggestions = [\ 'Try a smaller amount',\ 'Try a different destination token',\ 'Use USDC or ETH as intermediate'\ ]; } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#429-too-many-requests) 429 Too Many Requests **Cause**: Rate limit exceeded. | Retry? | Yes - with backoff | | --- | --- | | **Fix** | Wait and retry with exponential backoff | | **User Message** | ”Too many requests. Please wait a moment.” | **Backoff Strategy**: Copy Ask AI async function handleRateLimit(attempt) { const waitTime = Math.min(Math.pow(2, attempt) * 1000, 30000); console.log(`Rate limited. Waiting ${waitTime}ms...`); await sleep(waitTime); } // Usage in retry loop for (let attempt = 0; attempt < 5; attempt++) { try { return await fetchQuote(params); } catch (error) { if (error.status === 429) { await handleRateLimit(attempt); continue; } throw error; } } **Prevention**: * Use an API key for higher limits * Cache chain and token data * Batch requests where possible * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#500-internal-server-error) 500 Internal Server Error **Cause**: Server-side issue. | Retry? | Yes - once or twice | | --- | --- | | **Fix** | Wait briefly and retry | | **User Message** | ”Service temporarily unavailable. Retrying…“ | Copy Ask AI if (error.status >= 500) { await sleep(2000); // Retry once return await fetchQuote(params); } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#503-service-unavailable) 503 Service Unavailable **Cause**: Service temporarily down or overloaded. | Retry? | Yes - with longer delay | | --- | --- | | **Fix** | Wait 5-10 seconds and retry | | **User Message** | ”Service is temporarily unavailable. Please try again shortly.” | * * * [​](https://docs.li.fi/agents/reference/error-playbooks#api-error-codes) API Error Codes ------------------------------------------------------------------------------------------- The API returns error codes in the response body. Handle these specific scenarios: ### [​](https://docs.li.fi/agents/reference/error-playbooks#no_possible_route) `NO_POSSIBLE_ROUTE` **Cause**: No bridge or DEX can fulfill the request. | Retry? | No - change parameters | | --- | --- | | **Fix** | Try different tokens, chains, or amount | | **User Message** | ”This transfer route is not available. Try a different token pair.” | **Suggestions**: Copy Ask AI if (error.code === 'NO_POSSIBLE_ROUTE') { return { error: 'No route available', suggestions: [\ 'Try USDC or USDT as the destination token',\ 'Try a smaller amount',\ 'Check if both chains support the tokens'\ ] }; } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#amount_too_low) `AMOUNT_TOO_LOW` **Cause**: Transfer amount is below minimum threshold. | Retry? | No - increase amount | | --- | --- | | **Fix** | Increase `fromAmount` | | **User Message** | ”Amount too low for this transfer. Minimum is \[X\].” | Copy Ask AI if (error.code === 'AMOUNT_TOO_LOW') { // Error often includes minimum amount const minAmount = error.minAmount || 'unknown'; return { error: `Minimum amount required: ${minAmount}`, action: 'Increase transfer amount' }; } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#amount_too_high) `AMOUNT_TOO_HIGH` **Cause**: Amount exceeds available liquidity. | Retry? | No - decrease amount | | --- | --- | | **Fix** | Decrease `fromAmount` or split into multiple transfers | | **User Message** | ”Amount exceeds available liquidity. Try a smaller amount.” | * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#insufficient_liquidity) `INSUFFICIENT_LIQUIDITY` **Cause**: Not enough liquidity in pools. | Retry? | Maybe - try later | | --- | --- | | **Fix** | Try smaller amount, different bridge, or wait | | **User Message** | ”Insufficient liquidity for this transfer. Try a smaller amount.” | * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#slippage-error-code-1007) Slippage Error (code 1007) **Cause**: Price impact exceeds slippage tolerance. | Retry? | Yes - with adjusted slippage | | --- | --- | | **Fix** | Increase `slippage` parameter or decrease amount | | **User Message** | ”Price moved too much. Would you like to accept higher slippage?” | Copy Ask AI if (error.code === 1007 || error.message?.includes('slippage')) { // Offer to increase slippage const currentSlippage = params.slippage || 0.005; const suggestedSlippage = Math.min(currentSlippage * 2, 0.03); return { error: 'Slippage exceeded', currentSlippage: `${currentSlippage * 100}%`, suggestedSlippage: `${suggestedSlippage * 100}%`, action: 'Retry with higher slippage or smaller amount' }; } In status responses, slippage issues appear as substatus `SLIPPAGE_EXCEEDED`. * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#tool_timeout) `TOOL_TIMEOUT` **Cause**: Bridge or DEX response timeout. | Retry? | Yes - immediately | | --- | --- | | **Fix** | Retry the request | | **User Message** | ”Request timed out. Retrying…” | * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#chain_not_supported) `CHAIN_NOT_SUPPORTED` **Cause**: Requested chain is not available. | Retry? | No | | --- | --- | | **Fix** | Use a supported chain | | **User Message** | ”This blockchain is not currently supported.” | Copy Ask AI if (error.code === 'CHAIN_NOT_SUPPORTED') { // Fetch supported chains const chains = await getChains(); return { error: 'Chain not supported', supportedChains: chains.map(c => ({ id: c.id, name: c.name })) }; } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#token_not_supported) `TOKEN_NOT_SUPPORTED` **Cause**: Token is not available for transfers. | Retry? | No | | --- | --- | | **Fix** | Use a different token | | **User Message** | ”This token is not supported for transfers.” | * * * [​](https://docs.li.fi/agents/reference/error-playbooks#transaction-errors) Transaction Errors ------------------------------------------------------------------------------------------------- Errors that occur during transaction execution (not API errors): ### [​](https://docs.li.fi/agents/reference/error-playbooks#execution-reverted) `execution reverted` **Cause**: Smart contract rejected the transaction. | Retry? | Maybe - get new quote | | --- | --- | | **Fix** | Quote may be stale; get fresh quote and retry | | **User Message** | ”Transaction failed. Getting a fresh quote…” | Copy Ask AI if (error.message.includes('reverted')) { // Quote expired or conditions changed console.log('Transaction reverted. Fetching new quote...'); const newQuote = await getQuote(originalParams); // Retry with new quote } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#insufficient-funds) `insufficient funds` **Cause**: Wallet doesn’t have enough balance. | Retry? | No | | --- | --- | | **Fix** | User needs to add funds | | **User Message** | ”Insufficient balance. You need \[X\] \[TOKEN\] plus gas.” | Copy Ask AI if (error.message.includes('insufficient funds')) { return { error: 'Insufficient balance', required: { token: quote.action.fromAmount, gas: 'Plus gas fees in native token' } }; } * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#user-rejected) `user rejected` **Cause**: User declined the transaction in their wallet. | Retry? | No - ask user again | | --- | --- | | **Fix** | Ask if user wants to try again | | **User Message** | ”Transaction cancelled. Would you like to try again?” | * * * ### [​](https://docs.li.fi/agents/reference/error-playbooks#nonce-too-low) `nonce too low` **Cause**: Pending transaction with same nonce. | Retry? | Wait for pending tx | | --- | --- | | **Fix** | Wait for pending transaction or speed it up | | **User Message** | ”You have a pending transaction. Please wait or speed it up.” | * * * [​](https://docs.li.fi/agents/reference/error-playbooks#error-handling-template) Error Handling Template ----------------------------------------------------------------------------------------------------------- Copy Ask AI async function handleLiFiError(error, params) { const code = error.code || error.status; // Rate limiting if (code === 429) { return { retry: true, wait: true, message: 'Rate limited' }; } // Server errors if (code >= 500) { return { retry: true, message: 'Server error' }; } // No route if (code === 404 || error.code === 'NO_POSSIBLE_ROUTE') { return { retry: false, message: 'No route found', suggestions: getRouteSuggestions(params) }; } // Amount issues if (error.code === 'AMOUNT_TOO_LOW') { return { retry: false, message: `Amount too low. Minimum: ${error.minAmount}`, action: 'increase_amount' }; } // Slippage if (error.code === 1007 || error.message?.includes('slippage')) { return { retry: true, adjustParam: { slippage: params.slippage * 2 }, message: 'Consider increasing slippage' }; } // Default return { retry: false, message: error.message || 'Unknown error' }; } function getRouteSuggestions(params) { return [\ 'Try USDC, USDT, or ETH instead',\ 'Try a smaller amount',\ 'Check if tokens are supported on both chains'\ ]; } * * * [​](https://docs.li.fi/agents/reference/error-playbooks#quick-reference) Quick Reference ------------------------------------------------------------------------------------------- | Error | Retry? | Action | | --- | --- | --- | | 400 Bad Request | No | Fix parameters | | 404 No Route | Maybe | Change tokens/amount | | 429 Rate Limited | Yes | Exponential backoff | | 500 Server Error | Yes | Wait and retry | | AMOUNT\_TOO\_LOW | No | Increase amount | | Slippage error (1007) | Maybe | Increase slippage | | execution reverted | Maybe | Get new quote | | insufficient funds | No | User needs funds | | user rejected | No | Ask user again | * * * [​](https://docs.li.fi/agents/reference/error-playbooks#related-pages) Related Pages --------------------------------------------------------------------------------------- * [Decision Tables](https://docs.li.fi/agents/quick-start/decision-tables) - Error recovery decisions * [Status & Recovery](https://docs.li.fi/agents/workflows/status-recovery) - Handle transfer failures * [Rate Limits](https://docs.li.fi/api-reference/rate-limits) - Rate limit details [Endpoint Specifications](https://docs.li.fi/agents/reference/endpoint-specs) [Data Schemas](https://docs.li.fi/agents/reference/schemas) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Token Approvals - LI.FI [Skip to main content](https://docs.li.fi/agents/workflows/approvals#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Workflows Token Approvals [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [When Is Approval Needed?](https://docs.li.fi/agents/workflows/approvals#when-is-approval-needed) * [Decision Logic](https://docs.li.fi/agents/workflows/approvals#decision-logic) * [Step 1: Identify the Spender](https://docs.li.fi/agents/workflows/approvals#step-1-identify-the-spender) * [Step 2: Check Current Allowance](https://docs.li.fi/agents/workflows/approvals#step-2-check-current-allowance) * [Function Signature](https://docs.li.fi/agents/workflows/approvals#function-signature) * [JavaScript Example](https://docs.li.fi/agents/workflows/approvals#javascript-example) * [Python Example](https://docs.li.fi/agents/workflows/approvals#python-example) * [Step 3: Compare and Decide](https://docs.li.fi/agents/workflows/approvals#step-3-compare-and-decide) * [Step 4: Send Approval Transaction](https://docs.li.fi/agents/workflows/approvals#step-4-send-approval-transaction) * [Function Signature](https://docs.li.fi/agents/workflows/approvals#function-signature-2) * [Approval Amount Strategies](https://docs.li.fi/agents/workflows/approvals#approval-amount-strategies) * [JavaScript Example](https://docs.li.fi/agents/workflows/approvals#javascript-example-2) * [Python Example](https://docs.li.fi/agents/workflows/approvals#python-example-2) * [Complete Approval Flow](https://docs.li.fi/agents/workflows/approvals#complete-approval-flow) * [Common Mistakes](https://docs.li.fi/agents/workflows/approvals#common-mistakes) * [Approval Checklist](https://docs.li.fi/agents/workflows/approvals#approval-checklist) * [Related Pages](https://docs.li.fi/agents/workflows/approvals#related-pages) Before executing a transfer with an ERC20 token, you must approve the LI.FI contract to spend tokens on behalf of the user. This page explains when approval is needed and how to handle it correctly. [​](https://docs.li.fi/agents/workflows/approvals#when-is-approval-needed) When Is Approval Needed? ------------------------------------------------------------------------------------------------------ | Token Type | Approval Required | How to Identify | | --- | --- | --- | | Native token (ETH, MATIC, etc.) | **No** | Address is `0x0000000000000000000000000000000000000000` | | ERC20 token (USDC, USDT, etc.) | **Yes** | Any other address | ### [​](https://docs.li.fi/agents/workflows/approvals#decision-logic) Decision Logic Copy Ask AI IF fromToken.address === "0x0000000000000000000000000000000000000000" → Skip approval (native token) ELSE → Check allowance and approve if needed * * * [​](https://docs.li.fi/agents/workflows/approvals#step-1-identify-the-spender) Step 1: Identify the Spender -------------------------------------------------------------------------------------------------------------- The spender address comes from the quote response: Copy Ask AI { "estimate": { "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE" } } Always use `estimate.approvalAddress` from the quote response. Never hardcode spender addresses - they may vary by route or bridge. * * * [​](https://docs.li.fi/agents/workflows/approvals#step-2-check-current-allowance) Step 2: Check Current Allowance -------------------------------------------------------------------------------------------------------------------- Call the `allowance` function on the token contract: ### [​](https://docs.li.fi/agents/workflows/approvals#function-signature) Function Signature Copy Ask AI function allowance(address owner, address spender) external view returns (uint256) ### [​](https://docs.li.fi/agents/workflows/approvals#javascript-example) JavaScript Example Copy Ask AI import { createPublicClient, http, erc20Abi } from 'viem'; import { mainnet } from 'viem/chains'; const client = createPublicClient({ chain: mainnet, transport: http() }); async function checkAllowance(tokenAddress, ownerAddress, spenderAddress) { const allowance = await client.readContract({ address: tokenAddress, abi: erc20Abi, functionName: 'allowance', args: [ownerAddress, spenderAddress] }); return allowance; } // Usage const currentAllowance = await checkAllowance( quote.action.fromToken.address, // Token contract quote.action.fromAddress, // User's wallet quote.estimate.approvalAddress // LI.FI spender ); ### [​](https://docs.li.fi/agents/workflows/approvals#python-example) Python Example Copy Ask AI from web3 import Web3 # ERC20 ABI (minimal) ERC20_ABI = [\ {\ "constant": True,\ "inputs": [\ {"name": "owner", "type": "address"},\ {"name": "spender", "type": "address"}\ ],\ "name": "allowance",\ "outputs": [{"name": "", "type": "uint256"}],\ "type": "function"\ }\ ] def check_allowance(web3, token_address, owner, spender): contract = web3.eth.contract(address=token_address, abi=ERC20_ABI) return contract.functions.allowance(owner, spender).call() * * * [​](https://docs.li.fi/agents/workflows/approvals#step-3-compare-and-decide) Step 3: Compare and Decide ---------------------------------------------------------------------------------------------------------- Copy Ask AI const fromAmount = BigInt(quote.action.fromAmount); const currentAllowance = await checkAllowance(...); if (currentAllowance >= fromAmount) { // Sufficient allowance - proceed to execution console.log('Allowance sufficient, skipping approval'); } else { // Need to approve console.log('Approval needed'); await sendApproval(...); } * * * [​](https://docs.li.fi/agents/workflows/approvals#step-4-send-approval-transaction) Step 4: Send Approval Transaction ------------------------------------------------------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/workflows/approvals#function-signature-2) Function Signature Copy Ask AI function approve(address spender, uint256 amount) external returns (bool) ### [​](https://docs.li.fi/agents/workflows/approvals#approval-amount-strategies) Approval Amount Strategies | Strategy | Amount | Pros | Cons | | --- | --- | --- | --- | | Exact | `fromAmount` | Most secure | Requires approval for every transfer | | Unlimited | `type(uint256).max` | One-time approval | Higher risk if contract is compromised | | Buffer | `fromAmount * 2` | Balance of security and UX | May still need re-approval | For AI agents, **exact approval** is recommended for security. For user-facing apps, consider letting users choose. ### [​](https://docs.li.fi/agents/workflows/approvals#javascript-example-2) JavaScript Example Copy Ask AI import { createWalletClient, http, erc20Abi, maxUint256 } from 'viem'; async function approveToken(walletClient, tokenAddress, spenderAddress, amount) { const hash = await walletClient.writeContract({ address: tokenAddress, abi: erc20Abi, functionName: 'approve', args: [spenderAddress, amount] }); // Wait for transaction confirmation const receipt = await publicClient.waitForTransactionReceipt({ hash }); if (receipt.status !== 'success') { throw new Error('Approval transaction failed'); } return receipt; } // Exact approval await approveToken( walletClient, quote.action.fromToken.address, quote.estimate.approvalAddress, BigInt(quote.action.fromAmount) ); // Or unlimited approval await approveToken( walletClient, quote.action.fromToken.address, quote.estimate.approvalAddress, maxUint256 ); ### [​](https://docs.li.fi/agents/workflows/approvals#python-example-2) Python Example Copy Ask AI def approve_token(web3, token_address, spender, amount, private_key): contract = web3.eth.contract(address=token_address, abi=ERC20_ABI) # Build transaction tx = contract.functions.approve(spender, amount).build_transaction({ 'from': account.address, 'nonce': web3.eth.get_transaction_count(account.address), 'gas': 100000, 'gasPrice': web3.eth.gas_price }) # Sign and send signed = web3.eth.account.sign_transaction(tx, private_key) tx_hash = web3.eth.send_raw_transaction(signed.rawTransaction) # Wait for confirmation receipt = web3.eth.wait_for_transaction_receipt(tx_hash) if receipt['status'] != 1: raise Exception('Approval failed') return receipt * * * [​](https://docs.li.fi/agents/workflows/approvals#complete-approval-flow) Complete Approval Flow --------------------------------------------------------------------------------------------------- Copy Ask AI async function ensureApproval(quote, walletClient, publicClient) { const { fromToken, fromAmount, fromAddress } = quote.action; const { approvalAddress } = quote.estimate; // Step 1: Check if native token const NATIVE_ADDRESS = '0x0000000000000000000000000000000000000000'; if (fromToken.address.toLowerCase() === NATIVE_ADDRESS) { console.log('Native token - no approval needed'); return null; } // Step 2: Check current allowance const currentAllowance = await publicClient.readContract({ address: fromToken.address, abi: erc20Abi, functionName: 'allowance', args: [fromAddress, approvalAddress] }); // Step 3: Compare const requiredAmount = BigInt(fromAmount); if (currentAllowance >= requiredAmount) { console.log('Sufficient allowance exists'); return null; } // Step 4: Send approval console.log('Sending approval transaction...'); const hash = await walletClient.writeContract({ address: fromToken.address, abi: erc20Abi, functionName: 'approve', args: [approvalAddress, requiredAmount] }); const receipt = await publicClient.waitForTransactionReceipt({ hash }); console.log(`Approval confirmed: ${receipt.transactionHash}`); return receipt; } * * * [​](https://docs.li.fi/agents/workflows/approvals#common-mistakes) Common Mistakes ------------------------------------------------------------------------------------- Using wrong spender address Always use `quote.estimate.approvalAddress`, not a hardcoded address. Different routes may use different contracts. Not waiting for approval confirmation The main transaction will fail if sent before the approval is confirmed. Always wait for the approval receipt. Approving on wrong chain Ensure your wallet is connected to the source chain (`fromChain`) when sending the approval. Insufficient gas for approval Approval transactions typically need 50,000-100,000 gas. Use a reasonable gas limit. USDT special case USDT requires setting allowance to 0 before setting a new non-zero value. Check current allowance and reset if needed. Copy Ask AI // USDT special handling if (tokenSymbol === 'USDT' && currentAllowance > 0) { await approveToken(tokenAddress, spender, 0n); // Reset to 0 await approveToken(tokenAddress, spender, amount); // Then set new amount } * * * [​](https://docs.li.fi/agents/workflows/approvals#approval-checklist) Approval Checklist ------------------------------------------------------------------------------------------- Before executing a transfer, verify: * [ ] `fromToken.address` is NOT `0x0000...0000` (native token) * [ ] Retrieved `approvalAddress` from quote response * [ ] Checked current `allowance(owner, spender)` * [ ] Compared allowance to `fromAmount` * [ ] Sent approval tx if allowance < fromAmount * [ ] Waited for approval confirmation * [ ] Connected to correct chain (`fromChain`) * * * [​](https://docs.li.fi/agents/workflows/approvals#related-pages) Related Pages --------------------------------------------------------------------------------- * [Execution](https://docs.li.fi/agents/workflows/execution) - How to execute the main transaction * [Five-Call Recipe](https://docs.li.fi/agents/quick-start/five-call-recipe) - Complete workflow overview [Code Samples](https://docs.li.fi/agents/quick-start/code-samples) [Transaction Execution](https://docs.li.fi/agents/workflows/execution) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Get a quote for a token transfer - LI.FI [Skip to main content](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Single-step quote Get a quote for a token transfer [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Get a quote for a token transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/quote 200 404 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / quote Try it Get a quote for a token transfer cURL Copy Ask AI curl --request GET \ --url https://li.quest/v1/quote 200 404 Copy Ask AI { "id": "a8dc011a-f52d-4492-9e99-21de64b5453a", "type": "lifi", "tool": "1inch", "toolDetails": { "key": "1inch", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg", "name": "1inch" }, "action": { "fromChainId": 100, "toChainId": 100, "fromToken": { "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" }, "toToken": { "name": "Minerva Wallet SuperToken", "symbol": "MIVA", "coinKey": "MIVA", "decimals": 18, "chainId": 100, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51" }, "fromAmount": "1000000000000000000", "slippage": 0.003, "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0" }, "estimate": { "fromAmount": "1000000000000000000", "toAmount": "21922914496086353975", "toAmountMin": "21265227061203763356", "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d", "feeCosts": [], "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": { "fromToken": { "name": "xDAI", "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee", "symbol": "xDAI", "decimals": 18, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png" }, "toToken": { "name": "Minerva Wallet SuperToken", "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png" }, "toTokenAmount": "21922914496086353975", "fromTokenAmount": "1000000000000000000", "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ], "estimatedGas": 252364 } }, "integrator": "fee-demo", "transactionRequest": { "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "to": "0x1111111254fb6c44bac0bed2854e76f90643097d", "chainId": 100, "data": "0x...", "value": "0x0de0b6b3a7640000", "gasPrice": "0xb2d05e00", "gasLimit": "0x0e9cb2" }, "includedSteps": [\ {\ "id": "a8dc011a-f52d-4492-9e99-21de64b5453a",\ "type": "swap",\ "tool": "1inch",\ "toolDetails": {\ "key": "1inch",\ "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/exchanges/oneinch.svg",\ "name": "1inch"\ },\ "action": {\ "fromChainId": 100,\ "toChainId": 100,\ "fromToken": {\ "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"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "symbol": "MIVA",\ "coinKey": "MIVA",\ "decimals": 18,\ "chainId": 100,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ },\ "fromAmount": "1000000000000000000",\ "slippage": 0.003,\ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",\ "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0"\ },\ "estimate": {\ "fromAmount": "1000000000000000000",\ "toAmount": "21922914496086353975",\ "toAmountMin": "21265227061203763356",\ "approvalAddress": "0x1111111254fb6c44bac0bed2854e76f90643097d",\ "feeCosts": [],\ "gasCosts": [\ {\ "type": "SEND",\ "price": "1",\ "estimate": "252364",\ "limit": "315455",\ "amount": "252364",\ "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": {\ "fromToken": {\ "name": "xDAI",\ "address": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "symbol": "xDAI",\ "decimals": 18,\ "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0x6B175474E89094C44Da98b954EedeAC495271d0F/logo.png"\ },\ "toToken": {\ "name": "Minerva Wallet SuperToken",\ "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",\ "symbol": "MIVA",\ "decimals": 18,\ "logoURI": "https://minerva.digital/i/MIVA-Token_200x200.png"\ },\ "toTokenAmount": "21922914496086353975",\ "fromTokenAmount": "1000000000000000000",\ "protocols": [\ {\ "name": "GNOSIS_HONEYSWAP",\ "part": 100,\ "fromTokenAddress": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",\ "toTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51"\ }\ ],\ "estimatedGas": 252364\ }\ }\ }\ ] } For preset options, use the `preset` query parameter. See the [API presets overview](https://docs.li.fi/api-reference/presets/overview) . The [stablecoin preset](https://docs.li.fi/api-reference/presets/stablecoin) is ideal for stablecoin transfers and can be customized. To see supported stablecoins, use `/v1/tokens?tags=stablecoin`. #### Headers [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### Query Parameters [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-from-chain) fromChain string required The sending chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-to-chain) toChain string required The receiving chain. Can be the chain id or chain key [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-from-token) fromToken string required The token that should be transferred. Can be the address or the symbol [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-to-token) toToken string required The token that should be transferred to. Can be the address or the symbol [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-from-address) fromAddress string required The sending wallet address [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-to-address) toAddress string The receiving wallet address. If none is provided, the fromAddress will be used [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-from-amount) fromAmount string required The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-order) order enum 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. Available options: `FASTEST`, `CHEAPEST` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-slippage) slippage number The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. Required range: `0 <= x <= 1` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-fee) fee number 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%. Required range: `0 <= x < 1` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-allow-bridges) allowBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-allow-exchanges) allowExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-deny-bridges) denyBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-deny-exchanges) denyExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-prefer-bridges) preferBridges string\[\] 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. Bridge tool identifier or keyword. Retrieve current bridge keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-prefer-exchanges) preferExchanges string\[\] 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. Exchange tool identifier or keyword. Retrieve current exchange keys from the `/v1/tools` endpoint. Supported keywords: `all`, `none`, `default`, `[]`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-allow-destination-call) allowDestinationCall boolean 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`. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-from-amount-for-gas) fromAmountForGas string The amount of the token to convert to gas on the destination side. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-max-price-impact) maxPriceImpact number 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%. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-swap-step-timing-strategies) swapStepTimingStrategies string\[\] 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. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-route-timing-strategies) routeTimingStrategies string\[\] 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. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-skip-simulation) skipSimulation boolean Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate. [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#parameter-preset) preset string Pre-configured routing optimization preset. The preset value `stablecoin` is supported for requesting swap and/or bridging operations involving stablecoin tokens. Each preset provides optimized default settings for slippage, price impact, and tool preferences that can be overridden by custom configuration parameters set in the request. Required string length: `1 - 50` Pattern: `^[a-zA-Z0-9-_]+$` #### Response 200 application/json The step populated with the transaction data Object that represents one step of a `Route` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-id) id string required Unique identifier of the step [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-type) type enum 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. Available options: `swap`, `cross`, `lifi`, `protocol` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-tool) tool string required The tool used for this step. E.g. `relay` [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-action) action Root Type for Action · object required The action of the step Show child attributes Example: { "fromChainId": 100, "fromAmount": "1000000000000000000", "fromToken": { "address": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "symbol": "MIVA", "decimals": 18, "chainId": 100, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0.0455272371751059", "logoURI": "" }, "toChainId": 137, "toToken": { "address": "0xc0b2983a17573660053beeed6fdb1053107cf387", "symbol": "MIVA", "decimals": 18, "chainId": 137, "name": "Minerva Wallet SuperToken", "coinKey": "MIVA", "priceUSD": "0", "logoURI": "" }, "slippage": 0.003} [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-tool-details) toolDetails object The details of the tool used for this step. E.g. `relay` Show child attributes [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-estimate) estimate Root Type for Estimate · object The estimation for the step Show child attributes Example: { "fromAmount": "1000000000000000000", "toAmount": "999500000000000000", "toAmountMin": "999500000000000000", "tool": "allbridge", "executionDuration": 60, "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.0455272371751059", "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.0455272371751059", "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.0455272371751059", "logoURI": "" }, "amount": "500000000000000", "amountUSD": "22763618587552.95", "included": true } ], "gasCosts": [ { "type": "SEND", "price": "1.22", "estimate": "140000", "limit": "175000", "amount": "170800", "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": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "router": "0xeE2Ef40F688607CB23618d9312d62392786d13EB", "initiator": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "sendingChainId": 100, "sendingAssetId": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51", "amount": "1000000000000000000", "receivingChainId": 137, "receivingAssetId": "0xc0b2983a17573660053beeed6fdb1053107cf387", "amountReceived": "999500000000000000", "receivingAddress": "0x10fBFF9b9450D3A2d9d1612d6dE3726fACD8809E", "transactionId": "0x9f54c1764e19367c44706f4a6253941b81e9ec524af5590091aa8ae67e7644ed", "expiry": 1643369368, "callDataHash": "0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470", "callTo": "0x0000000000000000000000000000000000000000", "encryptedCallData": "0x", "sendingChainTxManagerAddress": "0x115909BDcbaB21954bEb4ab65FC2aBEE9866fa93", "receivingChainTxManagerAddress": "0x6090De2EC76eb1Dc3B5d632734415c93c44Fd113", "bidExpiry": 1643110469 }, "gasFeeInReceivingToken": "0", "totalFee": "500000000000000", "metaTxRelayerFee": "0", "routerFee": "500000000000000" }} [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-integrator) integrator string A string containing tracking information about the integrator of the API [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-included-steps) includedSteps Root Type for Internal Step · object\[\] Show child attributes [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-referrer) referrer string A string containing tracking information about the referrer of the integrator [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-execution) execution any An objection containing status information about the execution [​](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer#response-transaction-request) transactionRequest any An ether.js TransactionRequest that can be triggered using a wallet provider. ([https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest](https://docs.ethers.io/v5/api/providers/types/#providers-TransactionRequest) ) [Stablecoin preset](https://docs.li.fi/api-reference/presets/stablecoin) [Get a quote for a token transfer](https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer-1) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Partial Completion - LI.FI [Skip to main content](https://docs.li.fi/agents/workflows/partial-completion#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Workflows Partial Completion [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [What is a Partial Completion?](https://docs.li.fi/agents/workflows/partial-completion#what-is-a-partial-completion) * [Example Scenario](https://docs.li.fi/agents/workflows/partial-completion#example-scenario) * [Detecting Partial Completion](https://docs.li.fi/agents/workflows/partial-completion#detecting-partial-completion) * [Status Response for PARTIAL](https://docs.li.fi/agents/workflows/partial-completion#status-response-for-partial) * [Recovery Flow](https://docs.li.fi/agents/workflows/partial-completion#recovery-flow) * [Step 1: Extract Received Token Details](https://docs.li.fi/agents/workflows/partial-completion#step-1-extract-received-token-details) * [Step 2: Get a Same-Chain Swap Quote](https://docs.li.fi/agents/workflows/partial-completion#step-2-get-a-same-chain-swap-quote) * [Step 3: Present Options to User](https://docs.li.fi/agents/workflows/partial-completion#step-3-present-options-to-user) * [Complete Recovery Implementation](https://docs.li.fi/agents/workflows/partial-completion#complete-recovery-implementation) * [Why Partial Completions Happen](https://docs.li.fi/agents/workflows/partial-completion#why-partial-completions-happen) * [Prevention Strategies](https://docs.li.fi/agents/workflows/partial-completion#prevention-strategies) * [1\. Use Higher Slippage for Volatile Tokens](https://docs.li.fi/agents/workflows/partial-completion#1-use-higher-slippage-for-volatile-tokens) * [2\. Prefer Direct Bridge Routes](https://docs.li.fi/agents/workflows/partial-completion#2-prefer-direct-bridge-routes) * [3\. Check Route Feasibility Before Transfer](https://docs.li.fi/agents/workflows/partial-completion#3-check-route-feasibility-before-transfer) * [User Communication Templates](https://docs.li.fi/agents/workflows/partial-completion#user-communication-templates) * [Partial Completion Detected](https://docs.li.fi/agents/workflows/partial-completion#partial-completion-detected) * [Recovery Not Available](https://docs.li.fi/agents/workflows/partial-completion#recovery-not-available) * [Decision Tree](https://docs.li.fi/agents/workflows/partial-completion#decision-tree) * [Related Pages](https://docs.li.fi/agents/workflows/partial-completion#related-pages) A `PARTIAL` completion occurs when a cross-chain transfer succeeds but the user receives a different token than requested. This typically happens when the destination swap fails but the bridge succeeds. This page explains how to detect, interpret, and recover from partial completions. [​](https://docs.li.fi/agents/workflows/partial-completion#what-is-a-partial-completion) What is a Partial Completion? ------------------------------------------------------------------------------------------------------------------------- In a cross-chain transfer, there are often multiple steps: Copy Ask AI Source Chain Destination Chain [Token A] → [Swap to B] → [Bridge] → [Receive B] → [Swap to C] If the final swap on the destination chain fails (e.g., due to slippage), the user receives token B instead of token C. The value is preserved, but the token is different. ### [​](https://docs.li.fi/agents/workflows/partial-completion#example-scenario) Example Scenario * **Requested**: 10 USDC on Ethereum → ETH on Arbitrum * **Actual Result**: 10 USDC on Ethereum → 10 USDC on Arbitrum (swap failed) * **Status**: `DONE` with substatus `PARTIAL` * * * [​](https://docs.li.fi/agents/workflows/partial-completion#detecting-partial-completion) Detecting Partial Completion ------------------------------------------------------------------------------------------------------------------------ Check the status response: Copy Ask AI const result = await pollTransferStatus(params); if (result.partial) { // User received a different token const received = result.status.receiving; const requested = quote.action.toToken; console.log(`Requested: ${requested.symbol}`); console.log(`Received: ${received.token.symbol}`); } ### [​](https://docs.li.fi/agents/workflows/partial-completion#status-response-for-partial) Status Response for PARTIAL Copy Ask AI { "status": "DONE", "substatus": "PARTIAL", "sending": { "chainId": 1, "amount": "10000000", "token": { "symbol": "USDC", "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48" } }, "receiving": { "chainId": 42161, "amount": "10000000", "token": { "symbol": "USDC", "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831" } }, "tool": "stargate" } * * * [​](https://docs.li.fi/agents/workflows/partial-completion#recovery-flow) Recovery Flow ------------------------------------------------------------------------------------------ When a partial completion occurs, offer the user a same-chain swap to get their intended token. ### [​](https://docs.li.fi/agents/workflows/partial-completion#step-1-extract-received-token-details) Step 1: Extract Received Token Details Copy Ask AI function extractReceivedToken(status) { const { receiving } = status; return { chainId: receiving.chainId, address: receiving.token.address, symbol: receiving.token.symbol, decimals: receiving.token.decimals, amount: receiving.amount }; } ### [​](https://docs.li.fi/agents/workflows/partial-completion#step-2-get-a-same-chain-swap-quote) Step 2: Get a Same-Chain Swap Quote Request a quote to swap the received token to the intended token: Copy Ask AI async function getRecoveryQuote(status, originalQuote, userAddress) { const received = extractReceivedToken(status); const intended = originalQuote.action.toToken; // Same-chain swap on the destination chain const params = { fromChain: received.chainId, toChain: received.chainId, // Same chain fromToken: received.address, toToken: intended.address, fromAmount: received.amount, fromAddress: userAddress }; const response = await fetch( `https://li.quest/v1/quote?` + new URLSearchParams(params) ); return await response.json(); } ### [​](https://docs.li.fi/agents/workflows/partial-completion#step-3-present-options-to-user) Step 3: Present Options to User Copy Ask AI async function handlePartialCompletion(status, originalQuote, userAddress) { const received = extractReceivedToken(status); const intended = originalQuote.action.toToken; console.log('\n=== Partial Transfer Detected ==='); console.log(`You received: ${formatAmount(received.amount, received.decimals)} ${received.symbol}`); console.log(`You requested: ${intended.symbol}`); // Get recovery quote try { const recoveryQuote = await getRecoveryQuote(status, originalQuote, userAddress); const expectedOutput = formatAmount( recoveryQuote.estimate.toAmount, intended.decimals ); console.log(`\nRecovery option available:`); console.log(`Swap ${received.symbol} → ${intended.symbol}`); console.log(`Expected output: ${expectedOutput} ${intended.symbol}`); return { hasRecoveryOption: true, received, recoveryQuote }; } catch (error) { console.log(`\nNo direct swap available for ${received.symbol} → ${intended.symbol}`); return { hasRecoveryOption: false, received, error: error.message }; } } function formatAmount(amount, decimals) { return (Number(amount) / Math.pow(10, decimals)).toFixed(4); } * * * [​](https://docs.li.fi/agents/workflows/partial-completion#complete-recovery-implementation) Complete Recovery Implementation -------------------------------------------------------------------------------------------------------------------------------- Copy Ask AI async function executePartialRecovery( status, originalQuote, walletClient, publicClient, userAddress ) { // 1. Extract what was received const received = extractReceivedToken(status); const intended = originalQuote.action.toToken; console.log('Partial completion detected'); console.log(`Received: ${received.amount} ${received.symbol}`); console.log(`Intended: ${intended.symbol}`); // 2. Check if we need to recover (did user already get intended token?) if (received.address.toLowerCase() === intended.address.toLowerCase()) { console.log('Already received intended token - no recovery needed'); return { success: true, recovered: false }; } // 3. Get recovery quote console.log('Getting recovery swap quote...'); const recoveryQuote = await getRecoveryQuote(status, originalQuote, userAddress); // 4. Check if recovery is worthwhile (accounting for gas) const gasCostEstimate = estimateGasCost(recoveryQuote); const swapValue = estimateSwapValue(recoveryQuote); if (gasCostEstimate > swapValue * 0.1) { console.log('Gas cost too high relative to swap value'); console.log('Recommend keeping received token'); return { success: true, recovered: false, reason: 'Gas cost exceeds 10% of swap value' }; } // 5. Execute recovery swap console.log('Executing recovery swap...'); // Handle approval if needed await ensureApproval(recoveryQuote, walletClient, publicClient); // Execute swap const { hash } = await executeTransaction( walletClient, publicClient, recoveryQuote.transactionRequest ); console.log(`Recovery swap sent: ${hash}`); // 6. Poll recovery status (same-chain is usually fast) const recoveryResult = await pollTransferStatus({ txHash: hash, bridge: recoveryQuote.tool, fromChain: received.chainId, toChain: received.chainId }, { maxDuration: 5 * 60 * 1000 // 5 minutes for same-chain }); return { success: recoveryResult.success, recovered: true, recoveryTxHash: hash, finalStatus: recoveryResult.status }; } * * * [​](https://docs.li.fi/agents/workflows/partial-completion#why-partial-completions-happen) Why Partial Completions Happen ---------------------------------------------------------------------------------------------------------------------------- | Cause | Explanation | | --- | --- | | Slippage exceeded | Price moved beyond tolerance during transfer time | | Liquidity changed | DEX pool liquidity depleted | | Token delist | Destination DEX no longer supports the pair | | Contract issue | Destination DEX had temporary issue | * * * [​](https://docs.li.fi/agents/workflows/partial-completion#prevention-strategies) Prevention Strategies ---------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/workflows/partial-completion#1-use-higher-slippage-for-volatile-tokens) 1\. Use Higher Slippage for Volatile Tokens Copy Ask AI // For volatile tokens, increase slippage const slippage = isVolatileToken(toToken) ? 0.02 : 0.005; // 2% vs 0.5% ### [​](https://docs.li.fi/agents/workflows/partial-completion#2-prefer-direct-bridge-routes) 2\. Prefer Direct Bridge Routes Copy Ask AI // Request routes without destination swap when possible const quote = await getQuote({ ...params, toToken: 'USDC', // Bridge token directly instead of swapping }); ### [​](https://docs.li.fi/agents/workflows/partial-completion#3-check-route-feasibility-before-transfer) 3\. Check Route Feasibility Before Transfer For large amounts, you can verify the destination swap is feasible by requesting a quote for just that leg: Copy Ask AI // Get quote for just the destination swap const destSwapQuote = await getQuote({ fromChain: toChain, toChain: toChain, fromToken: bridgeToken, toToken: intendedToken, fromAmount: amount }); // If quote fails with NO_POSSIBLE_ROUTE, the destination swap may fail // Consider using the bridge token as the final destination * * * [​](https://docs.li.fi/agents/workflows/partial-completion#user-communication-templates) User Communication Templates ------------------------------------------------------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/workflows/partial-completion#partial-completion-detected) Partial Completion Detected Copy Ask AI Your transfer has partially completed. ✓ Bridged successfully ✗ Destination swap failed due to slippage You received: 10.00 USDC on Arbitrum You requested: ETH on Arbitrum Would you like to swap your USDC to ETH now? Estimated output: 0.0029 ETH ### [​](https://docs.li.fi/agents/workflows/partial-completion#recovery-not-available) Recovery Not Available Copy Ask AI Your transfer has partially completed. You received: 10.00 TOKEN on Arbitrum You requested: ETH on Arbitrum Unfortunately, there's no direct swap route for TOKEN → ETH. Your TOKEN balance is available in your wallet on Arbitrum. Options: 1. Keep the TOKEN 2. Manually swap on a DEX that supports this token * * * [​](https://docs.li.fi/agents/workflows/partial-completion#decision-tree) Decision Tree ------------------------------------------------------------------------------------------ Copy Ask AI PARTIAL status received │ ▼ Is received token = intended token? │ ┌───┴───┐ │ │ Yes No │ │ ▼ ▼ Done Get recovery quote │ ▼ Quote available? │ ┌───┴───┐ │ │ Yes No │ │ ▼ ▼ Gas cost < 10% Inform user, of value? suggest manual │ ┌───┴───┐ │ │ Yes No │ │ ▼ ▼ Execute Recommend keeping recovery received token * * * [​](https://docs.li.fi/agents/workflows/partial-completion#related-pages) Related Pages ------------------------------------------------------------------------------------------ * [Status & Recovery](https://docs.li.fi/agents/workflows/status-recovery) - Polling and status handling * [Decision Tables](https://docs.li.fi/agents/quick-start/decision-tables) - Route selection * [Error Playbooks](https://docs.li.fi/agents/reference/error-playbooks) - Handle failures [Status & Recovery](https://docs.li.fi/agents/workflows/status-recovery) [Endpoint Specifications](https://docs.li.fi/agents/reference/endpoint-specs) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Transaction Execution - LI.FI [Skip to main content](https://docs.li.fi/agents/workflows/execution#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Workflows Transaction Execution [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [The Transaction Request](https://docs.li.fi/agents/workflows/execution#the-transaction-request) * [Pre-Execution Checklist](https://docs.li.fi/agents/workflows/execution#pre-execution-checklist) * [Step 1: Verify Chain](https://docs.li.fi/agents/workflows/execution#step-1-verify-chain) * [JavaScript (viem)](https://docs.li.fi/agents/workflows/execution#javascript-viem) * [Python (web3.py)](https://docs.li.fi/agents/workflows/execution#python-web3-py) * [Step 2: Estimate Gas (Optional)](https://docs.li.fi/agents/workflows/execution#step-2-estimate-gas-optional) * [Step 3: Build the Transaction](https://docs.li.fi/agents/workflows/execution#step-3-build-the-transaction) * [JavaScript (viem)](https://docs.li.fi/agents/workflows/execution#javascript-viem-2) * [Gas Price Options](https://docs.li.fi/agents/workflows/execution#gas-price-options) * [Step 4: Sign and Send](https://docs.li.fi/agents/workflows/execution#step-4-sign-and-send) * [JavaScript (viem)](https://docs.li.fi/agents/workflows/execution#javascript-viem-3) * [Python (web3.py)](https://docs.li.fi/agents/workflows/execution#python-web3-py-2) * [Step 5: Handle the Result](https://docs.li.fi/agents/workflows/execution#step-5-handle-the-result) * [Complete Execution Flow](https://docs.li.fi/agents/workflows/execution#complete-execution-flow) * [Error Handling](https://docs.li.fi/agents/workflows/execution#error-handling) * [Common Execution Errors](https://docs.li.fi/agents/workflows/execution#common-execution-errors) * [Retry Logic](https://docs.li.fi/agents/workflows/execution#retry-logic) * [Gas Optimization Tips](https://docs.li.fi/agents/workflows/execution#gas-optimization-tips) * [Related Pages](https://docs.li.fi/agents/workflows/execution#related-pages) After getting a quote and handling any required approvals, you need to execute the actual transfer transaction. This page covers chain verification, gas handling, signing, and broadcasting. [​](https://docs.li.fi/agents/workflows/execution#the-transaction-request) The Transaction Request ----------------------------------------------------------------------------------------------------- The quote response includes a ready-to-use `transactionRequest` object: Copy Ask AI { "transactionRequest": { "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "data": "0x4630a0d8...", "value": "0x0", "gasLimit": "0x55730", "gasPrice": "0x5d21dba00", "chainId": 1 } } | Field | Description | | --- | --- | | `to` | LI.FI contract address | | `data` | Encoded function call | | `value` | Native token amount (hex, in wei) | | `gasLimit` | Estimated gas limit (hex) | | `gasPrice` | Suggested gas price (hex, optional) | | `chainId` | Chain ID for the transaction | * * * [​](https://docs.li.fi/agents/workflows/execution#pre-execution-checklist) Pre-Execution Checklist ----------------------------------------------------------------------------------------------------- Before sending the transaction: * [ ] Wallet is connected to the correct chain (`transactionRequest.chainId`) * [ ] User has sufficient native token for gas * [ ] User has sufficient `fromToken` balance * [ ] Token approval is confirmed (if ERC20) * [ ] Quote is still valid (not expired) * * * [​](https://docs.li.fi/agents/workflows/execution#step-1-verify-chain) Step 1: Verify Chain ---------------------------------------------------------------------------------------------- Ensure the wallet is on the correct chain before sending: ### [​](https://docs.li.fi/agents/workflows/execution#javascript-viem) JavaScript (viem) Copy Ask AI import { createWalletClient, http } from 'viem'; import { mainnet, arbitrum, optimism, polygon, base } from 'viem/chains'; const CHAIN_MAP = { 1: mainnet, 42161: arbitrum, 10: optimism, 137: polygon, 8453: base }; async function ensureCorrectChain(walletClient, targetChainId) { const currentChainId = await walletClient.getChainId(); if (currentChainId !== targetChainId) { console.log(`Switching from chain ${currentChainId} to ${targetChainId}`); await walletClient.switchChain({ id: targetChainId }); // Verify switch succeeded const newChainId = await walletClient.getChainId(); if (newChainId !== targetChainId) { throw new Error(`Failed to switch to chain ${targetChainId}`); } } return true; } ### [​](https://docs.li.fi/agents/workflows/execution#python-web3-py) Python (web3.py) Copy Ask AI def ensure_correct_chain(web3, target_chain_id): current_chain = web3.eth.chain_id if current_chain != target_chain_id: raise Exception( f"Wrong chain. Connected to {current_chain}, need {target_chain_id}" ) return True * * * [​](https://docs.li.fi/agents/workflows/execution#step-2-estimate-gas-optional) Step 2: Estimate Gas (Optional) ------------------------------------------------------------------------------------------------------------------ The quote includes a `gasLimit`, but you can re-estimate for accuracy: Copy Ask AI async function estimateGas(publicClient, txRequest, fromAddress) { try { const gasEstimate = await publicClient.estimateGas({ account: fromAddress, to: txRequest.to, data: txRequest.data, value: BigInt(txRequest.value || '0x0') }); // Add 20% buffer return (gasEstimate * 120n) / 100n; } catch (error) { // Fall back to quote's gasLimit console.log('Using quote gasLimit:', txRequest.gasLimit); return BigInt(txRequest.gasLimit); } } The quote’s `gasLimit` is usually accurate. Only re-estimate if you need precise gas costs or are optimizing for gas efficiency. * * * [​](https://docs.li.fi/agents/workflows/execution#step-3-build-the-transaction) Step 3: Build the Transaction ---------------------------------------------------------------------------------------------------------------- Convert the quote’s transaction request into a sendable transaction: ### [​](https://docs.li.fi/agents/workflows/execution#javascript-viem-2) JavaScript (viem) Copy Ask AI function buildTransaction(txRequest, gasLimit) { return { to: txRequest.to, data: txRequest.data, value: BigInt(txRequest.value || '0x0'), gas: gasLimit || BigInt(txRequest.gasLimit), chainId: txRequest.chainId }; } ### [​](https://docs.li.fi/agents/workflows/execution#gas-price-options) Gas Price Options You can use the quote’s suggested gas price or fetch current prices: Copy Ask AI // Option 1: Use quote's gas price const tx = { ...buildTransaction(txRequest), gasPrice: BigInt(txRequest.gasPrice) }; // Option 2: Let wallet determine gas price (recommended) const tx = buildTransaction(txRequest); // Don't set gasPrice - wallet will use current market rate // Option 3: Use EIP-1559 (for supported chains) const tx = { ...buildTransaction(txRequest), maxFeePerGas: parseGwei('50'), maxPriorityFeePerGas: parseGwei('2') }; * * * [​](https://docs.li.fi/agents/workflows/execution#step-4-sign-and-send) Step 4: Sign and Send ------------------------------------------------------------------------------------------------ ### [​](https://docs.li.fi/agents/workflows/execution#javascript-viem-3) JavaScript (viem) Copy Ask AI async function executeTransaction(walletClient, publicClient, txRequest) { // Ensure on correct chain await ensureCorrectChain(walletClient, txRequest.chainId); // Build transaction const tx = { to: txRequest.to, data: txRequest.data, value: BigInt(txRequest.value || '0x0'), gas: BigInt(txRequest.gasLimit) }; // Send transaction console.log('Sending transaction...'); const hash = await walletClient.sendTransaction(tx); console.log(`Transaction sent: ${hash}`); // Wait for confirmation console.log('Waiting for confirmation...'); const receipt = await publicClient.waitForTransactionReceipt({ hash, confirmations: 1 }); if (receipt.status !== 'success') { throw new Error(`Transaction failed: ${hash}`); } console.log(`Transaction confirmed in block ${receipt.blockNumber}`); return { hash, receipt }; } ### [​](https://docs.li.fi/agents/workflows/execution#python-web3-py-2) Python (web3.py) Copy Ask AI def execute_transaction(web3, tx_request, private_key): account = web3.eth.account.from_key(private_key) # Build transaction tx = { 'to': tx_request['to'], 'data': tx_request['data'], 'value': int(tx_request.get('value', '0x0'), 16), 'gas': int(tx_request['gasLimit'], 16), 'nonce': web3.eth.get_transaction_count(account.address), 'chainId': tx_request['chainId'] } # Get gas price tx['gasPrice'] = web3.eth.gas_price # Sign transaction signed = web3.eth.account.sign_transaction(tx, private_key) # Send transaction print('Sending transaction...') tx_hash = web3.eth.send_raw_transaction(signed.rawTransaction) print(f'Transaction sent: {tx_hash.hex()}') # Wait for confirmation print('Waiting for confirmation...') receipt = web3.eth.wait_for_transaction_receipt(tx_hash) if receipt['status'] != 1: raise Exception(f'Transaction failed: {tx_hash.hex()}') print(f'Confirmed in block {receipt["blockNumber"]}') return { 'hash': tx_hash.hex(), 'receipt': receipt } * * * [​](https://docs.li.fi/agents/workflows/execution#step-5-handle-the-result) Step 5: Handle the Result -------------------------------------------------------------------------------------------------------- After execution, save the transaction hash for status polling: Copy Ask AI const { hash: txHash } = await executeTransaction(walletClient, publicClient, quote.transactionRequest); // Save for status polling (only txHash is required, others speed up response) const statusParams = { txHash, // Required fromChain: quote.action.fromChainId, // Recommended for faster response toChain: quote.action.toChainId, // Optional bridge: quote.tool // Optional (e.g., "stargate") }; // Now poll for cross-chain status // See: Status & Recovery page * * * [​](https://docs.li.fi/agents/workflows/execution#complete-execution-flow) Complete Execution Flow ----------------------------------------------------------------------------------------------------- Copy Ask AI async function executeQuote(quote, walletClient, publicClient) { const { transactionRequest, action, tool, estimate } = quote; // 1. Verify chain await ensureCorrectChain(walletClient, transactionRequest.chainId); // 2. Handle approval if needed await ensureApproval(quote, walletClient, publicClient); // 3. Execute main transaction const tx = { to: transactionRequest.to, data: transactionRequest.data, value: BigInt(transactionRequest.value || '0x0'), gas: BigInt(transactionRequest.gasLimit) }; const hash = await walletClient.sendTransaction(tx); // 4. Wait for source chain confirmation const receipt = await publicClient.waitForTransactionReceipt({ hash, confirmations: 1 }); if (receipt.status !== 'success') { throw new Error('Transaction reverted'); } // 5. Return data for status polling return { txHash: hash, bridge: tool, fromChain: action.fromChainId, toChain: action.toChainId, receipt }; } * * * [​](https://docs.li.fi/agents/workflows/execution#error-handling) Error Handling ----------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/workflows/execution#common-execution-errors) Common Execution Errors | Error | Cause | Solution | | --- | --- | --- | | `insufficient funds` | Not enough ETH for gas + value | Check balance before sending | | `nonce too low` | Pending transaction exists | Wait or speed up pending tx | | `gas too low` | Gas limit insufficient | Increase gas limit | | `execution reverted` | Contract rejected transaction | Quote may be stale, get new quote | | `replacement fee too low` | Trying to replace pending tx | Increase gas price | ### [​](https://docs.li.fi/agents/workflows/execution#retry-logic) Retry Logic Copy Ask AI async function executeWithRetry(quote, walletClient, publicClient, maxRetries = 2) { for (let attempt = 0; attempt < maxRetries; attempt++) { try { return await executeQuote(quote, walletClient, publicClient); } catch (error) { const message = error.message.toLowerCase(); // Don't retry these errors if (message.includes('insufficient funds') || message.includes('user rejected') || message.includes('denied')) { throw error; } // Quote might be stale - get new quote and retry if (message.includes('reverted') && attempt < maxRetries - 1) { console.log('Transaction reverted, fetching new quote...'); quote = await getQuote(originalParams); continue; } throw error; } } } * * * [​](https://docs.li.fi/agents/workflows/execution#gas-optimization-tips) Gas Optimization Tips ------------------------------------------------------------------------------------------------- 1. **Use EIP-1559 where supported** - More predictable gas costs 2. **Don’t over-estimate gas** - Quote’s gasLimit is usually accurate 3. **Check gas prices** - High gas times may make transfers expensive 4. **Consider L2s** - Arbitrum, Optimism, Base have much lower gas costs Copy Ask AI // Check if gas cost is reasonable const gasCostWei = BigInt(txRequest.gasLimit) * BigInt(txRequest.gasPrice); const gasCostEth = Number(gasCostWei) / 1e18; if (gasCostEth > 0.01) { // More than 0.01 ETH console.log(`Warning: High gas cost: ${gasCostEth} ETH`); } * * * [​](https://docs.li.fi/agents/workflows/execution#related-pages) Related Pages --------------------------------------------------------------------------------- * [Token Approvals](https://docs.li.fi/agents/workflows/approvals) - Handle ERC20 approvals * [Status & Recovery](https://docs.li.fi/agents/workflows/status-recovery) - Poll transfer status * [Five-Call Recipe](https://docs.li.fi/agents/quick-start/five-call-recipe) - Complete workflow [Token Approvals](https://docs.li.fi/agents/workflows/approvals) [Status & Recovery](https://docs.li.fi/agents/workflows/status-recovery) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Gas Fronting - LI.FI [Skip to main content](https://docs.li.fi/guides/gas-subsidy#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Integration Gas Fronting [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Does LI.FI support gas fronting / subsidizing gas?](https://docs.li.fi/guides/gas-subsidy#does-li-fi-support-gas-fronting-%2F-subsidizing-gas) [​](https://docs.li.fi/guides/gas-subsidy#does-li-fi-support-gas-fronting-/-subsidizing-gas) Does LI.FI support gas fronting / subsidizing gas? -------------------------------------------------------------------------------------------------------------------------------------------------- Sometimes called “Refuel”. When users bridge to a new chain they haven’t interacted with before, they need the chain’s native asset to cover gas fees. If the bridged asset is not a native token, users face a “cold-start” problem, where they cannot perform any on-chain actions due to the lack of gas. To address this, LI.FI has streamlined the process into a single transaction. Users can designate a portion of the asset being sent to be converted into the native asset on the destination chain, along with the desired bridged asset. This ensures they have the necessary gas to begin interacting on the new chain. This is possible by adding the `fromAmountForGas` to a quote or routes request LI.Fuel is not supported via /contractCalls endpoint or Composer. [API latency and optimization](https://docs.li.fi/guides/latency) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Status & Recovery - LI.FI [Skip to main content](https://docs.li.fi/agents/workflows/status-recovery#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Workflows Status & Recovery [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Status Endpoint](https://docs.li.fi/agents/workflows/status-recovery#status-endpoint) * [Parameters](https://docs.li.fi/agents/workflows/status-recovery#parameters) * [Example Request](https://docs.li.fi/agents/workflows/status-recovery#example-request) * [Status Response](https://docs.li.fi/agents/workflows/status-recovery#status-response) * [Status Values](https://docs.li.fi/agents/workflows/status-recovery#status-values) * [Primary Status](https://docs.li.fi/agents/workflows/status-recovery#primary-status) * [Substatus (when status = DONE)](https://docs.li.fi/agents/workflows/status-recovery#substatus-when-status-%3D-done) * [Decision Matrix](https://docs.li.fi/agents/workflows/status-recovery#decision-matrix) * [Polling Implementation](https://docs.li.fi/agents/workflows/status-recovery#polling-implementation) * [Recommended Strategy](https://docs.li.fi/agents/workflows/status-recovery#recommended-strategy) * [JavaScript Implementation](https://docs.li.fi/agents/workflows/status-recovery#javascript-implementation) * [Python Implementation](https://docs.li.fi/agents/workflows/status-recovery#python-implementation) * [Handling Each Outcome](https://docs.li.fi/agents/workflows/status-recovery#handling-each-outcome) * [COMPLETED - Success](https://docs.li.fi/agents/workflows/status-recovery#completed-success) * [PARTIAL - Different Token Received](https://docs.li.fi/agents/workflows/status-recovery#partial-different-token-received) * [REFUNDED - Tokens Returned](https://docs.li.fi/agents/workflows/status-recovery#refunded-tokens-returned) * [FAILED - Permanent Failure](https://docs.li.fi/agents/workflows/status-recovery#failed-permanent-failure) * [Estimated Transfer Times](https://docs.li.fi/agents/workflows/status-recovery#estimated-transfer-times) * [Timeout Handling](https://docs.li.fi/agents/workflows/status-recovery#timeout-handling) * [Related Pages](https://docs.li.fi/agents/workflows/status-recovery#related-pages) Cross-chain transfers take time to complete. This page explains how to poll the status endpoint, interpret status values, and handle each outcome correctly. [​](https://docs.li.fi/agents/workflows/status-recovery#status-endpoint) Status Endpoint ------------------------------------------------------------------------------------------- Copy Ask AI GET https://li.quest/v1/status ### [​](https://docs.li.fi/agents/workflows/status-recovery#parameters) Parameters | Parameter | Required | Description | Source | | --- | --- | --- | --- | | `txHash` | **Yes** | Transaction hash from execution | From `sendTransaction` result | | `fromChain` | No | Source chain ID (recommended) | From `quote.action.fromChainId` | | `toChain` | No | Destination chain ID | From `quote.action.toChainId` | | `bridge` | No | Bridge/tool identifier | From `quote.tool` | Only `txHash` is required. Providing `fromChain` speeds up the response significantly. ### [​](https://docs.li.fi/agents/workflows/status-recovery#example-request) Example Request Copy Ask AI curl "https://li.quest/v1/status?txHash=0xabc123..." Or with optional parameters for faster response: Copy Ask AI curl "https://li.quest/v1/status?txHash=0xabc123...&fromChain=1&toChain=42161&bridge=stargate" * * * [​](https://docs.li.fi/agents/workflows/status-recovery#status-response) Status Response ------------------------------------------------------------------------------------------- Copy Ask AI { "transactionId": "0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "sending": { "txHash": "0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "txLink": "https://etherscan.io/tx/0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "chainId": 1, "amount": "10000000", "token": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606" }, "amountUSD": "9.9961", "gasPrice": "65729222", "gasUsed": "220266", "gasToken": { "address": "0x0000000000000000000000000000000000000000", "chainId": 1, "symbol": "ETH", "decimals": 18, "name": "ETH", "coinKey": "ETH", "priceUSD": "2923.27" }, "gasAmount": "14477912813052", "gasAmountUSD": "0.0423", "timestamp": 1737625200 }, "receiving": { "txHash": "0xdef456789abc...", "txLink": "https://arbiscan.io/tx/0xdef456789abc...", "chainId": 42161, "amount": "9965731", "token": { "address": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", "chainId": 42161, "symbol": "USDC", "decimals": 6, "name": "USD Coin", "coinKey": "USDC", "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "priceUSD": "0.999606" }, "amountUSD": "9.9618", "timestamp": 1737625204 }, "lifiExplorerLink": "https://explorer.li.fi/tx/0x1695bded7c1634dce4a200bdec72be0ed6cc5f7153ec2dc832b271d790eb00c8", "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "tool": "across", "status": "DONE", "substatus": "COMPLETED" } * * * [​](https://docs.li.fi/agents/workflows/status-recovery#status-values) Status Values --------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/workflows/status-recovery#primary-status) Primary Status | Status | Meaning | Action | | --- | --- | --- | | `NOT_FOUND` | Transaction not indexed yet | Continue polling | | `PENDING` | Transfer in progress | Continue polling | | `DONE` | Transfer finished | Check `substatus` for outcome | | `FAILED` | Transfer failed | Handle error | ### [​](https://docs.li.fi/agents/workflows/status-recovery#substatus-when-status-=-done) Substatus (when status = DONE) | Substatus | Meaning | User Outcome | | --- | --- | --- | | `COMPLETED` | Success | Received exact requested token | | `PARTIAL` | Partial success | Received different token (full value) | | `REFUNDED` | Failed with refund | Tokens returned to sender | * * * [​](https://docs.li.fi/agents/workflows/status-recovery#decision-matrix) Decision Matrix ------------------------------------------------------------------------------------------- Copy Ask AI IF status === "NOT_FOUND" → Wait and poll again (tx may not be indexed yet) IF status === "PENDING" → Wait and poll again (transfer in progress) IF status === "DONE" IF substatus === "COMPLETED" → Success! User received toToken on toChain IF substatus === "PARTIAL" → Partial success - see Partial Completion guide IF substatus === "REFUNDED" → Failed - tokens returned to user on fromChain IF status === "FAILED" → Permanent failure - inform user, may need manual recovery * * * [​](https://docs.li.fi/agents/workflows/status-recovery#polling-implementation) Polling Implementation --------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/workflows/status-recovery#recommended-strategy) Recommended Strategy | Attempt | Wait Time | Total Time | | --- | --- | --- | | 1-6 | 10 seconds | 1 minute | | 7-12 | 30 seconds | 4 minutes | | 13-24 | 60 seconds | 16 minutes | | 25+ | 120 seconds | Until timeout | ### [​](https://docs.li.fi/agents/workflows/status-recovery#javascript-implementation) JavaScript Implementation Copy Ask AI async function pollTransferStatus(params, options = {}) { const { txHash, bridge, fromChain, toChain } = params; const { maxDuration = 30 * 60 * 1000, // 30 minutes onStatusUpdate = () => {} } = options; const startTime = Date.now(); let attempt = 0; while (Date.now() - startTime < maxDuration) { attempt++; try { const response = await fetch( `https://li.quest/v1/status?txHash=${txHash}&bridge=${bridge}&fromChain=${fromChain}&toChain=${toChain}` ); if (!response.ok) { throw new Error(`Status API error: ${response.status}`); } const status = await response.json(); // Notify caller of status update onStatusUpdate(status, attempt); // Check for terminal states if (status.status === 'DONE') { return { success: status.substatus === 'COMPLETED', partial: status.substatus === 'PARTIAL', refunded: status.substatus === 'REFUNDED', status }; } if (status.status === 'FAILED') { return { success: false, failed: true, status }; } } catch (error) { console.error(`Polling error (attempt ${attempt}):`, error.message); // Continue polling despite errors } // Calculate wait time with backoff const waitTime = getWaitTime(attempt); await sleep(waitTime); } throw new Error('Status polling timeout'); } function getWaitTime(attempt) { if (attempt <= 6) return 10000; // 10 seconds if (attempt <= 12) return 30000; // 30 seconds if (attempt <= 24) return 60000; // 60 seconds return 120000; // 2 minutes } function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } ### [​](https://docs.li.fi/agents/workflows/status-recovery#python-implementation) Python Implementation Copy Ask AI import time import requests def poll_transfer_status(tx_hash, bridge, from_chain, to_chain, max_duration=1800, on_update=None): """ Poll transfer status until completion or timeout. Args: tx_hash: Transaction hash bridge: Bridge tool name from_chain: Source chain ID to_chain: Destination chain ID max_duration: Maximum polling duration in seconds (default 30 min) on_update: Optional callback for status updates Returns: dict with success, partial, refunded, failed flags and status """ start_time = time.time() attempt = 0 while time.time() - start_time < max_duration: attempt += 1 try: url = ( f"https://li.quest/v1/status" f"?txHash={tx_hash}" f"&bridge={bridge}" f"&fromChain={from_chain}" f"&toChain={to_chain}" ) response = requests.get(url) response.raise_for_status() status = response.json() # Notify callback if on_update: on_update(status, attempt) # Check terminal states if status.get('status') == 'DONE': substatus = status.get('substatus') return { 'success': substatus == 'COMPLETED', 'partial': substatus == 'PARTIAL', 'refunded': substatus == 'REFUNDED', 'status': status } if status.get('status') == 'FAILED': return { 'success': False, 'failed': True, 'status': status } except Exception as e: print(f"Polling error (attempt {attempt}): {e}") # Wait with backoff wait_time = get_wait_time(attempt) time.sleep(wait_time) raise Exception('Status polling timeout') def get_wait_time(attempt): if attempt <= 6: return 10 if attempt <= 12: return 30 if attempt <= 24: return 60 return 120 * * * [​](https://docs.li.fi/agents/workflows/status-recovery#handling-each-outcome) Handling Each Outcome ------------------------------------------------------------------------------------------------------- ### [​](https://docs.li.fi/agents/workflows/status-recovery#completed-success) COMPLETED - Success Copy Ask AI if (result.success) { const { receiving } = result.status; console.log('Transfer successful!'); console.log(`Received: ${receiving.amount} ${receiving.token.symbol}`); console.log(`On chain: ${receiving.chainId}`); console.log(`Tx: ${receiving.txHash}`); // No further action needed } ### [​](https://docs.li.fi/agents/workflows/status-recovery#partial-different-token-received) PARTIAL - Different Token Received Copy Ask AI if (result.partial) { const { receiving } = result.status; console.log('Transfer completed with different token'); console.log(`Received: ${receiving.amount} ${receiving.token.symbol}`); // User may want to swap to their intended token // See: Partial Completion guide } ### [​](https://docs.li.fi/agents/workflows/status-recovery#refunded-tokens-returned) REFUNDED - Tokens Returned Copy Ask AI if (result.refunded) { const { sending } = result.status; console.log('Transfer failed - tokens refunded'); console.log(`Refunded: ${sending.amount} ${sending.token.symbol}`); console.log(`On chain: ${sending.chainId}`); // User's tokens are back on the source chain // May retry with different parameters } ### [​](https://docs.li.fi/agents/workflows/status-recovery#failed-permanent-failure) FAILED - Permanent Failure Copy Ask AI if (result.failed) { console.error('Transfer failed permanently'); console.error('Error:', result.status.error); // May need manual intervention // Contact support with transaction details } * * * [​](https://docs.li.fi/agents/workflows/status-recovery#estimated-transfer-times) Estimated Transfer Times ------------------------------------------------------------------------------------------------------------- The quote response includes `estimate.executionDuration` (in seconds) which gives you the expected transfer time for that specific route. Always use this value rather than general estimates. Transfer times vary significantly based on the bridge used and network conditions. The `executionDuration` field in the quote response provides the most accurate estimate for each specific route. * * * [​](https://docs.li.fi/agents/workflows/status-recovery#timeout-handling) Timeout Handling --------------------------------------------------------------------------------------------- If polling times out: 1. **Don’t assume failure** - The transfer may still complete 2. **Save the transaction details** - txHash, bridge, fromChain, toChain 3. **Provide manual check** - User can check status later 4. **Link to explorer** - Provide transaction explorer URLs Copy Ask AI function getExplorerUrl(chainId, txHash) { const explorers = { 1: 'https://etherscan.io/tx/', 42161: 'https://arbiscan.io/tx/', 10: 'https://optimistic.etherscan.io/tx/', 137: 'https://polygonscan.com/tx/', 8453: 'https://basescan.org/tx/' }; return `${explorers[chainId] || 'https://blockscan.com/tx/'}${txHash}`; } // On timeout console.log('Status check timed out. The transfer may still be processing.'); console.log(`Check source tx: ${getExplorerUrl(fromChain, txHash)}`); console.log('You can also check status manually at: https://li.fi/'); * * * [​](https://docs.li.fi/agents/workflows/status-recovery#related-pages) Related Pages --------------------------------------------------------------------------------------- * [Partial Completion](https://docs.li.fi/agents/workflows/partial-completion) - Handle PARTIAL status * [Transaction Execution](https://docs.li.fi/agents/workflows/execution) - Execute transfers * [Error Playbooks](https://docs.li.fi/agents/reference/error-playbooks) - Handle failures [Transaction Execution](https://docs.li.fi/agents/workflows/execution) [Partial Completion](https://docs.li.fi/agents/workflows/partial-completion) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Integration - LI.FI [Skip to main content](https://docs.li.fi/faqs/integration#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Integration Integration [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) How can I ensure users only sign on the source chain while allowing the bridge to complete the swap on the destination chain? Set the following options: * `allowSwitchChain: false` to prevent automatic chain switching * `allowDestinationCall: true` to allow the bridge to complete the swap on the destination chain Can I detect on-chain if a swap was made via a specific client using the LI.FI widget? Yes. LI.FI emits on-chain events for all transfers and includes the `integrator` parameter. You can filter by this parameter to identify swaps from your client. Can I send native ETH with a payable function via the /quote/contractCalls endpoint? No. The `/quote/contractCalls` endpoint does not support sending native ETH. Does the quote response include gas information? Yes. The quote includes an estimated gas amount and transaction data. How can we improve the response speed of /advanced/stepTransaction calls? Add `?skipSimulation=true` to the request. This skips on-chain simulation and improves response time. How do I ensure the gaszip service works? Include the `fromAmountGas` parameter in your request. This is required for gaszip to function. When does LI.FI require a balance check during transaction generation? * On EVM: A balance check is required to generate transaction data. * On Bitcoin and Sui: A balance check is also performed during transaction generation. What is the default sorting behavior if the order parameter is not provided? If `order` is not set, the default is `CHEAPEST`. How can we track cross-chain transaction status? Use the LI.FI status endpoint. It reports full or partial completion, the token and amount delivered, and the destination chain. How can we tune quote speed versus quote quality? Timing is configurable per request. Use a short target for fast flow, or wait longer on larger trades to collect more provider responses. A common pattern is ~400ms minimum for fast traders and ~1s with at least four results for larger trades. Does LI.FI already aggregate providers like Relay and Jupiter? Yes. LI.FI aggregates multiple providers, including Relay and Jupiter, giving unified fee collection, tracking, and routing without duplicate integrations. When should we use the quote endpoint versus the routes endpoint, and can we force single-transaction flows? Use the quote endpoint when you want the best single option with ready-to-execute transaction data. Use the routes endpoint when you need to present multiple choices before fetching step data. You can also filter to simpler, single-transaction flows for mainstream UX. Does LI.FI support cross-chain NFT purchases? Yes. LI.FI can fund on one chain and complete an NFT purchase on another by passing call data; some marketplaces may need allowlisting or extra integration steps. [Common issues](https://docs.li.fi/faqs/troubleshooting) [Slippage and price impact](https://docs.li.fi/faqs/slippage-price-impact) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Common issues - LI.FI [Skip to main content](https://docs.li.fi/faqs/troubleshooting#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation General Common issues [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) What does the error message 'Return amount is not enough' mean? This error indicates that the expected return amount is below the minimum accepted threshold. It typically occurs due to market volatility or low liquidity. What should I do if I encounter the error 'Exchange rate has changed'? This error occurs when the exchange rate changes between quoting and execution. You can increase the slippage tolerance to reduce failures, but be aware that it may result in a worse rate.For SDK users, implement `acceptExchangeRateUpdateHook` and return `true` to automatically accept updated rates.See [SDK documentation](https://docs.li.fi/sdk/execute-routes#acceptexchangerateupdatehook) I'm getting an error 'EVM contract destination addresses not currently supported by mayanWH and mayanMCTP' This error means the bridge version you used—mayanWH or mayanMCTP—does not support smart contracts as destination addresses. Why did my Mayan MCTP transfer take so long and cost so much? Mayan MCTP runs on CCTP, which is slower and incurs higher gas costs on Ethereum mainnet. This method is typically used for large transfers when other bridges lack liquidity. What does error code 1001: 'None of the available routes could successfully generate a tx' mean? This error often means the `fromAddress` does not have enough balance to cover the transaction. Why does my bridge show 'Not an EVM Transaction' error even though funds arrived? This error appears when the transaction has not yet been indexed by LI.FI. Once it is indexed, the scanner will display the transaction details. What does the error selector 0x963b34a5... mean in a failed swap? This is likely a custom error from the DEX, such as `MinimalOutputBalanceViolation`. Most swap errors originate at the DEX level. If not, LI.FI has fallback validation logic. Error selectors vary depending on the DEX. When is a FAILED transaction eligible for a refund, and can its status change afterward? Refund eligibility depends on the bridge or tool used. Some bridges refund automatically after failure. Others may leave the transaction unresolved. What does the NOT\_PROCESSABLE\_REFUND\_NEEDED substatus mean? This substatus is triggered by cBridge. It indicates the transfer could not be processed due to price, gas, or liquidity changes. LI.FI then initiates a refund on the source chain. What does the PARTIAL substatus mean in a transaction? `PARTIAL` is a final status. The full value was received, but in a different token than expected. What happens if my swap or bridge fails or only completes partially? Same-chain swaps are atomic: they either succeed or revert (gas may still be spent). In cross-chain routes, the bridge can succeed while the destination swap fails; the user is then automatically refunded on the destination chain, typically in the bridged asset. If a destination swap fails, prompt a fresh quote and approval to finish the swap on the destination chain. [Fees and Monetization](https://docs.li.fi/faqs/fees-monetization) [Integration](https://docs.li.fi/faqs/integration) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Route availability - LI.FI [Skip to main content](https://docs.li.fi/faqs/route-availability#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Routing Route availability [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) What does the error message 'Return amount is not enough' mean? This slippage error appears when the expected return amount is lower than the minimum accepted threshold. It often happens due to market volatility or low liquidity. What should I do if I encounter the error 'Exchange rate has changed'? This error indicates a price change between the quote and execution. To resolve it, increase the slippage tolerance. Be cautious—higher slippage can result in worse rates.If you’re using the SDK, implement `acceptExchangeRateUpdateHook` and return `true` to accept updated rates automatically. Refer to the SDK docs: [acceptExchangeRateUpdateHook](https://docs.li.fi/sdk/execute-routes#acceptexchangerateupdatehook) Why do I see the error 'EVM contract destination addresses not currently supported by mayanWH and mayanMCTP'? Some versions of Mayan (mayanWH and mayanMCTP) do not support smart contract addresses as destinations. Why did my Mayan MCTP transfer take long and cost more? Mayan MCTP uses CCTP, which has slower settlement times and higher gas costs on Ethereum. It is generally used for large transfers when other bridges lack liquidity. What does error code 1001: 'None of the available routes could successfully generate a tx' mean? This usually means the `fromAddress` does not have enough funds to cover the transaction. Why do I see the error 'Not an EVM Transaction' even though funds arrived? This message appears when the transaction has not yet been indexed by LI.FI. Once it is indexed, the scanner will display its details. What does error selector 0x963b34a5... mean in a failed swap? This code likely represents a custom error from the DEX, such as `MinimalOutputBalanceViolation`. Most swap failures come from DEX-level checks. If not, LI.FI applies its own fallback checks. Error codes may vary by provider. When is a failed transaction eligible for a refund, and can the status change afterward? Refund policies depend on the bridge. Some bridges issue refunds automatically; others may leave transactions unresolved. What does the NOT\_PROCESSABLE\_REFUND\_NEEDED substatus mean? This substatus usually comes from cBridge. It means the transfer could not be processed due to price, gas, or liquidity issues. LI.FI will then trigger a refund on the source chain. What does the PARTIAL substatus mean in a transaction? PARTIAL is a final status. The user receives the full value, but in a different token than expected. Why don't I get quotes when bridging from a Solana wallet with no SOL? LI.FI blocks quotes if the wallet has no SOL. This prevents failures from rent and gas fees. To fetch rates without requiring a funded wallet, use the `/advanced/routes` endpoint without specifying a wallet address. What are intents and how do they fit into routing? An intent states the desired outcome (e.g., “Swap 1 ETH on Ethereum into at least X USDC on Base”). LI.FI can pass intents to a solver marketplace where solvers compete to fulfill them. Routing may present intent-based execution alongside classic DEX aggregation and bridge routes; integrators see intents as another path under the same fee model. [Slippage and price impact](https://docs.li.fi/faqs/slippage-price-impact) [Token support and availability](https://docs.li.fi/faqs/token-support) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Slippage and price impact - LI.FI [Skip to main content](https://docs.li.fi/faqs/slippage-price-impact#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Integration Slippage and price impact [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Why is the toAmount lower than expected based on the slippage value? `toAmount` is the estimated post-swap amount. `toAmountMin` is the minimum amount based on your slippage setting.A lower `toAmount` can result from price impact or market fluctuations.To filter out routes with high price impact, use the `maxPriceImpact` parameter. What's the difference between slippage and price impact? * **Slippage**: Difference between `toAmount` and `toAmountMin` * **Price impact**: Difference between the original quote and `toAmount` Does increasing slippage protect against exchange rate changes? No. Increasing slippage tolerance does not prevent rate changes. It only widens the acceptable range before failing the transaction. What slippage tolerance should I use for stablecoins or major tokens? Use 0.5%. Slippage is typically minimal unless the trade size is very small or very large. What is the best slippage value for cross-chain swaps? It depends on the token, chain, and amount. There is no universal value.To reduce failures: * Execute the quote immediately * For Solana same-chain swaps, omit the slippage parameter to let LI.FI auto-calculate How does LI.FI calculate price impact, and is there a minimum amount for filtering? LI.FI calculates price impact using the difference in USD value between input and output tokens.Price impact filtering does not apply to trades under $10. How can I avoid slippage errors? * Execute the quote immediately * Refresh the quote if delayed * Increase the allowed slippage in your API request Do you guarantee what the user receives, and how does slippage work? Yes. A minimum received amount is enforced when the user signs; execution must deliver at least that minimum or it reverts. Slippage exists because prices/liquidity move between quote and execution. Auto slippage picks a suitable buffer by asset liquidity (lower for stablecoins, higher for long-tail assets), and LI.FI commonly defaults to ~0.5% with the minimum slightly below the estimate to absorb normal movement. [Integration](https://docs.li.fi/faqs/integration) [Route availability](https://docs.li.fi/faqs/route-availability) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Fees and Monetization - LI.FI [Skip to main content](https://docs.li.fi/faqs/fees-monetization#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation General Fees and Monetization [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Does LI.FI charge a fee on every swap or bridge transaction? LI.FI charges a 0.25% service fee on each transaction. You can add your own fee by including a fee percentage and an integrator string during setup. LI.FI also offers volume-based commercial discounts. What is the fee structure for the supported Bridges and DEXes? Fee structures vary by bridge or DEX. Some use a percentage-based model, others charge a flat fee. The API provides detailed fee data in the `feeCosts` object when you request quotes or routes. How can I set up my account to start charging fees as an integrator? Create an account at [LI.FI Portal](https://portal.li.fi/) . Then, pass the `integrator` string and `fee` parameter as described in our [fee setup guide](https://docs.li.fi/introduction/integrating-lifi/monetizing-integration) . Where and how can I withdraw the fees collected through my integration? You can withdraw collected fees from the [LI.FI Portal](https://portal.li.fi/) . Alternatively, use our API: Copy Ask AI GET /v1/integrators/{integratorId}/withdraw/{chainId} See the [API documentation](https://docs.li.fi/api-reference/introduction) for details. Can I withdraw old fees with my new wallet on portal? No. You must use the original wallet to withdraw previously collected fees. Are all fees included in the rate taken in the same token? No. Fees can be collected in different tokens: * Some bridge fees (e.g., Stargate, Arbitrum) are in the native asset. * Gas fees are also in the native asset. * Other fees are usually deducted from the sending asset. What are the integrator, referrer, and fee parameters in LI.FI? * `integrator`: Identifies your integration for analytics and tracking. * `referrer`: Optional on-chain string for your internal tracking. * `fee`: Decimal percentage deducted from the sending asset as your commission. How does fee collection work, and which token are fees taken in? Fees are taken from the from token. Partners can withdraw accrued fees directly, or LI.FI can consolidate, swap to a preferred stablecoin, and pay out on thresholds and schedules. Custom fee models are available if required. [Common issues](https://docs.li.fi/faqs/troubleshooting) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Token support and availability - LI.FI [Skip to main content](https://docs.li.fi/faqs/token-support#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Routing Token support and availability [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) Why does the /tokens endpoint only return certain tokens? The `/tokens` endpoint uses a verified list, updated daily from sources like Debank and CoinMarketCap. This ensures only trustworthy tokens are returned by default.To include a custom token, submit a pull request to: [lifinance/customized-token-list](https://github.com/lifinance/customized-token-list) How does LI.FI handle support for newly launched tokens? LI.FI supports all tokens, including new ones, through two methods: * If requested by token address, LI.FI searches on-chain and finds available liquidity. * If listed in the default `/tokens` endpoint, the token becomes searchable by name on jumper.exchange. To avoid filtering new tokens due to missing USD prices, set: Copy Ask AI sdkConfig.routeOptions.maxPriceImpact = 1 For best results, notify LI.FI in advance of token launches. Can I set a different toAddress for Solana swaps using Jupiter via LI.FI? Not currently. The Jupiter API sends tokens to the same address used to initiate the swap. How can users request tokens to be added to the LI.FI widget? To include tokens in your own integration, use the widget’s `tokens` option. See the widget documentation for details.To request a token listing across LI.FI’s API and Jumper globally, submit a pull request to: [lifinance/customized-token-list](https://github.com/lifinance/customized-token-list) What should I know about Solana swap support in the LI.FI widget? * **Token coverage:** All tokens supported by Jupiter are available. * **New token listings:** Tokens added by Jupiter are typically available within one day. * **Fee collection:** Use the same `fee` parameter as for EVM chains. Fees are sent directly to your wallet. How does LI.FI handle token discovery and spam tokens? LI.FI ships curated token lists from supported exchanges and bridges with spam filtering. Users can still paste any token address, but defaults avoid promoting spam tokens. [Route availability](https://docs.li.fi/faqs/route-availability) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Intermediate tokens - LI.FI [Skip to main content](https://docs.li.fi/guides/intermediate-tokens#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Troubleshooting Intermediate tokens [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [How PARTIAL Works in LI.FI](https://docs.li.fi/guides/intermediate-tokens#how-partial-works-in-li-fi) * [Intermediate Tokens by Bridge](https://docs.li.fi/guides/intermediate-tokens#intermediate-tokens-by-bridge) Intermediate tokens are fallback assets that appear when the requested destination token can’t be delivered as planned. This typically happens on cross chain routes where the bridge moves a token to the destination chain, and a final swap is supposed to convert it into the requested asset. If that destination swap can’t be executed safely (because of the user’s slippage settings or current liquidity), we stop at the bridged token and return a `DONE/PARTIAL` status instead of forcing a bad trade or letting the transaction fail. You might encounter an intermediate token in cases such as: * **Destination swap failure or reversion:** For example, the price moved outside the allowed slippage range, or there wasn’t enough liquidity for a new or long tail token. In this case, the user receives the bridged asset (for example USDC, axlUSDC) to keep funds safe. * **Liquidity or routing constraints:** In some edge cases, the route may exit into a different but closely related token (like another stablecoin or a wrapped gas token) when it offers better liquidity, rather than letting the route fail completely. In all cases, the user still ends up with value on the destination chain and can complete a follow up swap themselves, often by adjusting slippage or choosing a different route. * * * [​](https://docs.li.fi/guides/intermediate-tokens#how-partial-works-in-li-fi) How PARTIAL Works in LI.FI ----------------------------------------------------------------------------------------------------------- * When you see `status: DONE` with `substatus: PARTIAL`, it indicates that the transfer has been completed from LI.FI’s perspective, but the user did not receive the exact token they originally requested on the destination chain. * In essence, LI.FI compares the expected output with the actual outcome on the destination side. For any route where a value transfer is confirmed, LI.FI performs a check similar to the following: Copy Ask AI if isExpectedAsset and ( tool-specific isPartialValue(...) === true OR we saw a LiFiTransferRecovered event ) -> substatus = PARTIAL else if refunded -> substatus = REFUNDED else -> substatus = COMPLETED * * * [​](https://docs.li.fi/guides/intermediate-tokens#intermediate-tokens-by-bridge) Intermediate Tokens by Bridge ----------------------------------------------------------------------------------------------------------------- | Bridge | When we flag DONE / PARTIAL | Intermediate tokens seen | | --- | --- | --- | | Across | No native partials; only LiFiTransferRecovered edge cases. | Cake, DAI, ETH, USDC, USDC.e, USDT, USD₮0, USDT0, USDbC, WBTC, WETH, WLD, sUSD, ZRO, L3 | | Chainflip | Swap completed but a refund egress also fired (value split). | BTC, ETH, FLIP, USDC | | Mayan Fast MCTP | Temporary fallback to USDC until the last hop executes. | USDC | | Mayan MCTP | Same fallback behavior as the fast route. | USDC | | Relay / RelayDepository | Relay reports a refund and still sends funds elsewhere (cross-chain split). | USDC, ETH, G | | Squid | Axelar delivers an axl\* token mismatching the requested asset. | axlUSDC | | Stargate v2 | Pool exits with an alternate USD stable or wrapped gas token because of liquidity constraints. | ETH, USDC, USDC.e, USDCe, USDC.n, USDC.e(Stargate), USDT, USDT0, USDt, USDT(Stargate), m.USDT, WETH | | Symbiosis | Symbiosis indicates a “transit token” still en route. | UETH, USDC, USDC.e, USDbC, WBNB, WETH, ETH, USDT | [Debugging Failed Transactions](https://docs.li.fi/guides/debug-failed-transactions) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # How Composer Works - LI.FI [Skip to main content](https://docs.li.fi/composer/how-it-works#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Getting Started How Composer Works [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Architecture Overview](https://docs.li.fi/composer/how-it-works#architecture-overview) * [Core Components](https://docs.li.fi/composer/how-it-works#core-components) * [1\. Onchain VM (Execution Engine)](https://docs.li.fi/composer/how-it-works#1-onchain-vm-execution-engine) * [2\. eDSL and Compiler](https://docs.li.fi/composer/how-it-works#2-edsl-and-compiler) * [3\. Dynamic Calldata Injection](https://docs.li.fi/composer/how-it-works#3-dynamic-calldata-injection) * [Transaction Lifecycle](https://docs.li.fi/composer/how-it-works#transaction-lifecycle) * [Step-by-Step Breakdown](https://docs.li.fi/composer/how-it-works#step-by-step-breakdown) * [Same-Chain vs. Cross-Chain](https://docs.li.fi/composer/how-it-works#same-chain-vs-cross-chain) * [Same-Chain Composition](https://docs.li.fi/composer/how-it-works#same-chain-composition) * [Cross-Chain Composition](https://docs.li.fi/composer/how-it-works#cross-chain-composition) * [Pre-Execution Simulation](https://docs.li.fi/composer/how-it-works#pre-execution-simulation) * [Composer as a LI.FI Tool](https://docs.li.fi/composer/how-it-works#composer-as-a-li-fi-tool) * [Next Steps](https://docs.li.fi/composer/how-it-works#next-steps) This page explains the internal architecture of LI.FI Composer: how multi-step DeFi operations get compiled, simulated, and executed as a single transaction. * * * [​](https://docs.li.fi/composer/how-it-works#architecture-overview) Architecture Overview -------------------------------------------------------------------------------------------- Composer transforms a user’s intent (e.g., “deposit USDC into Morpho on Base”) into an optimised, executable onchain transaction. The system has three layers: ![Composer architecture flow: from user intent through the LI.FI API, eDSL compiler, and Onchain VM to atomic onchain execution](https://mintcdn.com/lifi/WkX1S_lTbWO3mGlt/images/composer/composer-flow.png?w=2500&fit=max&auto=format&n=WkX1S_lTbWO3mGlt&q=85&s=f9176a02fede2a1a16ef18fd29e8440b) * * * [​](https://docs.li.fi/composer/how-it-works#core-components) Core Components -------------------------------------------------------------------------------- ### [​](https://docs.li.fi/composer/how-it-works#1-onchain-vm-execution-engine) 1\. Onchain VM (Execution Engine) The Onchain VM is a smart contract deployed on supported EVM chains. It acts as a general-purpose execution engine that can: * Call any other onchain protocol or series of protocols * Pass outputs from one step as inputs to the next * Handle token approvals, transfers, and balance checks between steps * Execute the entire sequence atomically (same-chain) The VM receives compiled bytecode and executes it in a single transaction, abstracting away the complexity of multi-protocol interactions. **Contract address (Ethereum):** [`0xD214A2eB3799076791A4Cde4F0AB184A49dB832d`](https://etherscan.io/address/0xD214A2eB3799076791A4Cde4F0AB184A49dB832d) ### [​](https://docs.li.fi/composer/how-it-works#2-edsl-and-compiler) 2\. eDSL and Compiler The embedded Domain-Specific Language (eDSL) is a purpose-built language for expressing contract interactions in TypeScript. When a Composer route is requested: 1. The routing engine identifies which protocols and actions are needed 2. The eDSL expresses these interactions as a typed program 3. The compiler transforms this program into bytecode the Onchain VM can execute This approach provides type safety, composability, and the ability to optimise execution paths at compile time. ### [​](https://docs.li.fi/composer/how-it-works#3-dynamic-calldata-injection) 3\. Dynamic Calldata Injection Many DeFi operations require data from a previous step. For example, depositing into a vault requires knowing the exact token amount received from a preceding swap. Composer handles this through **dynamic calldata injection**: * The compiler identifies dependencies between steps * At execution time, the VM automatically intercepts outputs from completed steps * These outputs are injected as inputs into subsequent steps * This happens entirely onchain, within the same transaction * * * [​](https://docs.li.fi/composer/how-it-works#transaction-lifecycle) Transaction Lifecycle -------------------------------------------------------------------------------------------- Here is the full lifecycle of a Composer transaction, from user request to onchain execution: ![Composer transaction lifecycle: from quote request through route optimisation, eDSL compilation, simulation, onchain execution, and status tracking](https://mintcdn.com/lifi/WkX1S_lTbWO3mGlt/images/composer/txflow.png?w=2500&fit=max&auto=format&n=WkX1S_lTbWO3mGlt&q=85&s=5ee3eab11c5c657fd832241012290c1a) ### [​](https://docs.li.fi/composer/how-it-works#step-by-step-breakdown) Step-by-Step Breakdown | Step | What Happens | Where | | --- | --- | --- | | **1\. Quote request** | Developer requests a quote with a vault token as `toToken` | Client → API | | **2\. Route optimisation** | LI.FI’s routing engine finds the optimal path across DEXs, bridges, and protocols | API backend | | **3\. eDSL compilation** | The Composer compiler generates bytecode for the Onchain VM | API backend | | **4\. Pre-execution simulation** | The full execution path is simulated to verify it will succeed and estimate outputs | API backend | | **5\. Quote response** | API returns `transactionRequest` (ready-to-sign tx) plus estimated amounts | API → Client | | **6\. Transaction submission** | User signs and submits the transaction to the blockchain | Client → Chain | | **7\. Onchain execution** | The Onchain VM executes the compiled bytecode, performing all steps atomically | Onchain | | **8\. Confirmation** | Transaction is confirmed; vault tokens are in the user’s wallet | Chain → Client | | **9\. Status check** | Optionally poll `/status` for cross-chain transfers | Client → API | * * * [​](https://docs.li.fi/composer/how-it-works#same-chain-vs-cross-chain) Same-Chain vs. Cross-Chain ----------------------------------------------------------------------------------------------------- Composer behaves differently depending on whether the source and destination are on the same chain. ### [​](https://docs.li.fi/composer/how-it-works#same-chain-composition) Same-Chain Composition ![Same-chain Composer flow: all steps (swap, deposit, receive vault tokens) execute atomically in a single transaction](https://mintcdn.com/lifi/WkX1S_lTbWO3mGlt/images/composer/singletx.png?w=2500&fit=max&auto=format&n=WkX1S_lTbWO3mGlt&q=85&s=8cb12e0df932cc0a9a335c38b8b33d4d) * **Atomic execution** — all steps succeed or none do * **Single gas payment** — one transaction fee * **Instant completion** — confirmed in one block * **Simulation guarantee** — if simulation passes, execution will succeed (barring extreme edge cases like mempool front-running) ### [​](https://docs.li.fi/composer/how-it-works#cross-chain-composition) Cross-Chain Composition ![Cross-chain Composer flow: source chain transaction bridges to destination chain, where Composer executes deposit atomically](https://mintcdn.com/lifi/WkX1S_lTbWO3mGlt/images/composer/crosstx.png?w=2500&fit=max&auto=format&n=WkX1S_lTbWO3mGlt&q=85&s=43ffe4ff90a3f395510a278116743fc7) * **Two-phase execution** — source chain transaction triggers a bridge, then destination chain actions execute * **Per-phase atomicity** — each phase is atomic within its chain, but the overall flow is eventually consistent * **Bridge latency** — total time depends on the bridge used (seconds to minutes) * **Status tracking required** — use `/status` endpoint to monitor cross-chain progress Composer itself operates on a single chain. Cross-chain flows are achieved by combining LI.FI’s bridge routing with Composer’s onchain execution on the destination chain. This is seamless from the developer’s perspective — you make the same API call regardless of whether it’s same-chain or cross-chain. * * * [​](https://docs.li.fi/composer/how-it-works#pre-execution-simulation) Pre-Execution Simulation -------------------------------------------------------------------------------------------------- One of Composer’s key safety features is **pre-execution simulation**. Before returning a quote, the backend: 1. **Simulates the full execution path** using a fork of the current chain state 2. **Verifies all steps succeed** — token swaps, approvals, deposits 3. **Calculates exact output amounts** — the estimated vault tokens the user will receive 4. **Detects potential failures** — insufficient liquidity, incompatible tokens, protocol-specific issues If simulation fails, the API returns an error rather than a transaction that would revert onchain. This protects users from wasting gas on failed transactions. * * * [​](https://docs.li.fi/composer/how-it-works#composer-as-a-li-fi-tool) Composer as a LI.FI Tool -------------------------------------------------------------------------------------------------- In the LI.FI architecture, Composer is classified as a **tool** — similar to how bridges and DEX aggregators are tools. This means: * Composer routes appear alongside bridge and swap routes in API responses * The routing engine automatically selects Composer when it’s the optimal path * As with any LI.FI tool, integrators can use `allowTools` / `denyTools` to include or exclude Composer from their routing preferences * * * [​](https://docs.li.fi/composer/how-it-works#next-steps) Next Steps ---------------------------------------------------------------------- [API Integration Guide\ ---------------------\ \ Step-by-step guide to integrating Composer via the REST API](https://docs.li.fi/composer/guides/api-integration) [Cross-Chain Patterns\ --------------------\ \ Learn how to compose cross-chain DeFi operations](https://docs.li.fi/composer/guides/cross-chain-compose) [Error Handling\ --------------\ \ Understand failure modes and how to handle them](https://docs.li.fi/composer/reference/error-handling) [Supported Protocols\ -------------------\ \ Full list of supported protocols and capabilities](https://docs.li.fi/composer/reference/supported-protocols) [Quickstart](https://docs.li.fi/composer/quickstart) [API Integration](https://docs.li.fi/composer/guides/api-integration) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # What is Composer? - LI.FI [Skip to main content](https://docs.li.fi/composer/overview#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![US](https://d3gk2c5xim1je2.cloudfront.net/flags/US.svg) English Search... ⌘KAsk AI Search... Navigation Getting Started What is Composer? [Overview](https://docs.li.fi/introduction/introduction) [API Reference](https://docs.li.fi/api-reference/introduction) [JS/TS SDK](https://docs.li.fi/sdk/overview) [Intent/Solver Marketplace](https://docs.li.fi/lifi-intents/introduction) [Swap/Bridge Widget](https://docs.li.fi/widget/overview) [Composer](https://docs.li.fi/composer/overview) [Guides](https://docs.li.fi/guides/gas-subsidy) [MCP Server](https://docs.li.fi/mcp-server/overview) [For Agents](https://docs.li.fi/agents/overview) [FAQs](https://docs.li.fi/faqs/fees-monetization) On this page * [Why Use Composer?](https://docs.li.fi/composer/overview#why-use-composer) * [Try It Out](https://docs.li.fi/composer/overview#try-it-out) * [Choose Your Integration Path](https://docs.li.fi/composer/overview#choose-your-integration-path) * [How It Works](https://docs.li.fi/composer/overview#how-it-works) * [Supported Protocols](https://docs.li.fi/composer/overview#supported-protocols) * [Who Is Composer For?](https://docs.li.fi/composer/overview#who-is-composer-for) * [Current Limitations](https://docs.li.fi/composer/overview#current-limitations) * [Next Steps](https://docs.li.fi/composer/overview#next-steps) LI.FI Composer bundles multiple onchain actions (swaps, bridges, deposits, staking) into a **single transaction**. Instead of navigating multiple protocols and signing dozens of transactions, your users complete complex DeFi workflows in one click. **No custom integration required.** Composer works out-of-the-box with the LI.FI API, SDK, and Widget. If you already use LI.FI, you already have Composer. * * * [​](https://docs.li.fi/composer/overview#why-use-composer) Why Use Composer? ------------------------------------------------------------------------------- * **Single Transaction Execution** — Multiple actions completed in one transaction. Users sign once, pay gas once. * **Lower Gas Costs** — Batching actions eliminates per-step transaction fees. * **Simulated Before Execution** — The entire execution path is simulated before submitting onchain, preventing failed transactions and giving users certainty about outcomes. * **Atomic (Same-Chain)** — Same-chain compositions execute atomically: all steps succeed or none do. * **Cross-Chain Composability** — Composer plugs into LI.FI’s full routing engine for cross-chain swap + bridge + deposit flows. * **Works Everywhere** — Available through the API, SDK, and Widget with zero additional integration. * * * [​](https://docs.li.fi/composer/overview#try-it-out) Try It Out ------------------------------------------------------------------ Deposit 1 USDC into a Morpho vault on Base with a single API call: curl TypeScript Copy Ask AI curl -X GET 'https://li.quest/v1/quote?\ fromChain=8453&\ toChain=8453&\ fromToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&\ toToken=0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A&\ fromAddress=YOUR_WALLET_ADDRESS&\ toAddress=YOUR_WALLET_ADDRESS&\ fromAmount=1000000' Set `toToken` to a [supported protocol’s](https://docs.li.fi/composer/reference/supported-protocols) token address and Composer activates automatically. No extra parameters or configuration needed.[Run your first Composer transaction\ -----------------------------------\ \ Follow the step-by-step quickstart to execute your first Composer transaction in under 5 minutes.](https://docs.li.fi/composer/quickstart) * * * [​](https://docs.li.fi/composer/overview#choose-your-integration-path) Choose Your Integration Path ------------------------------------------------------------------------------------------------------ [API\ ---\ \ Direct REST API integration for full control over the Composer flow.](https://docs.li.fi/composer/guides/api-integration) [SDK\ ---\ \ Use the LI.FI TypeScript SDK for managed execution, status tracking, and error handling.](https://docs.li.fi/composer/guides/sdk-integration) [Widget\ ------\ \ Drop-in UI component — Composer works automatically with zero additional code.](https://docs.li.fi/composer/guides/widget-integration) * * * [​](https://docs.li.fi/composer/overview#how-it-works) How It Works ---------------------------------------------------------------------- Composer uses two core components: 1. **Onchain VM (Execution Engine)** — A smart contract that can call any other onchain protocol or series of them, handling all execution without requiring users to understand blockchain interactions. 2. **eDSL and Compiler** — A purpose-built domain-specific language to express contract interactions in TypeScript. This gets compiled to bytecode for the VM to execute onchain. When you request a quote with a vault token as the `toToken`, LI.FI’s routing engine automatically: * Identifies the optimal path (swap, bridge, or both) * Compiles the Composer instructions * Simulates the full execution path * Returns a ready-to-sign transaction [Deep dive into Composer architecture\ ------------------------------------\ \ Learn about the Onchain VM, eDSL compiler, dynamic calldata injection, and the full transaction lifecycle.](https://docs.li.fi/composer/how-it-works) * * * [​](https://docs.li.fi/composer/overview#supported-protocols) Supported Protocols ------------------------------------------------------------------------------------ Composer currently supports the following protocols. The team is open to integration requests based on technical feasibility and community feedback. | Protocol | Type | Actions | Link | | --- | --- | --- | --- | | Morpho V1 & V2 | Lending / Vaults | Deposit, Withdraw | [morpho.org](https://morpho.org/) | | Aave V3 | Lending | Deposit, Withdraw | [aave.com](https://aave.com/) | | Euler | Lending | Deposit, Withdraw | [euler.finance](https://www.euler.finance/) | | Pendle | Yield | Deposit, Withdraw | [pendle.finance](https://www.pendle.finance/) | | Lido wstETH | Liquid Staking | Deposit, Withdraw | [lido.fi](https://stake.lido.fi/wrap) | | EtherFi | Liquid Staking | Deposit, Withdraw | [ether.fi](https://www.ether.fi/) | | Ethena | Yield | Deposit | [ethena.fi](https://ethena.fi/) | | Kinetiq | Staking | Deposit | [kinetiq.xyz](https://kinetiq.xyz/) | | Kinetiq Earn (vkHYPE) | Yield | Deposit | [kinetiq.xyz](https://kinetiq.xyz/stake-hype#kinetiq-earn) | | Felix Vanilla | Vaults | Deposit, Withdraw | [usefelix.xyz](https://www.usefelix.xyz/) | | HyperLend | Lending | Deposit, Withdraw | [hyperlend.finance](https://hyperlend.finance/) | | Maple | Lending | Deposit | [maple.finance](https://maple.finance/) | | Neverland | Vaults | Deposit, Withdraw | [neverland.money](https://neverland.money/) | | USDai | Yield | Deposit, Withdraw | [usd.ai](https://usd.ai/) | | Seamless | Lending | Deposit, Withdraw | [seamlessprotocol.com](https://seamlessprotocol.com/) | [Full protocol reference\ -----------------------\ \ View all supported protocols, their types, actions, and links.](https://docs.li.fi/composer/reference/supported-protocols) * * * [​](https://docs.li.fi/composer/overview#who-is-composer-for) Who Is Composer For? ------------------------------------------------------------------------------------- Wallet & DeFi Platforms Offer users sophisticated onchain actions directly in your app. Composer reduces user friction while expanding the breadth of DeFi operations your platform supports. Create campaigns for user engagement — e.g., “deposit into new protocol” promotions. Onchain Protocols (Lending, Staking, Vaults) Enable 1-click cross-chain deposits into your protocol. Users with assets on any supported chain can deposit into your protocol without leaving their current app. Protocol Teams Get your protocol integrated as a Composer target to expand user accessibility and adoption. Partner protocols can be invited to the Composer backend codebase. See [For Protocol Teams](https://docs.li.fi/composer/for-protocols/integration-guide) . * * * [​](https://docs.li.fi/composer/overview#current-limitations) Current Limitations ------------------------------------------------------------------------------------ * **EVM chains only** — No Solana or non-EVM chain support yet * **Tokenised positions only** — Composer targets must return a token (e.g., vault tokens, LP tokens, LSTs) * * * [​](https://docs.li.fi/composer/overview#next-steps) Next Steps ------------------------------------------------------------------ [Quickstart\ ----------\ \ Execute your first Composer transaction in under 5 minutes](https://docs.li.fi/composer/quickstart) [How It Works\ ------------\ \ Understand the architecture, VM, and transaction lifecycle](https://docs.li.fi/composer/how-it-works) [API Integration Guide\ ---------------------\ \ Full walkthrough for direct API integration](https://docs.li.fi/composer/guides/api-integration) [Use Case Recipes\ ----------------\ \ Copy-paste recipes for common Composer workflows](https://docs.li.fi/composer/recipes/vault-deposits) [Quickstart](https://docs.li.fi/composer/quickstart) ⌘I Assistant Responses are generated using AI and may contain mistakes. --- # Gas Fronting" 翻译成简体中文是 "Gas Fronting"(保持技术术语和品牌名称不变)。 - LI.FI [跳转到主要内容](https://docs.li.fi/zh-Hans/guides/gas-subsidy#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![CN](https://d3gk2c5xim1je2.cloudfront.net/flags/CN.svg) 简体中文 搜索... ⌘K询问AI 搜索... Navigation 集成 Gas Fronting" 翻译成简体中文是 "Gas Fronting"(保持技术术语和品牌名称不变)。 [概述](https://docs.li.fi/zh-Hans/introduction/introduction) [API 参考](https://docs.li.fi/zh-hans-api-reference/introduction) [JS/TS SDK](https://docs.li.fi/zh-Hans/sdk/overview) [意图/求解器市场](https://docs.li.fi/zh-Hans/lifi-intents/introduction) [交换/桥接组件](https://docs.li.fi/zh-Hans/widget/overview) [指南](https://docs.li.fi/zh-Hans/guides/gas-subsidy) [Composer](https://docs.li.fi/zh-Hans/composer/overview) [API 延迟和优化](https://docs.li.fi/zh-Hans/guides/latency) ⌘I 助手 AI生成的回答可能包含错误。 --- # 中间令牌 - LI.FI [跳转到主要内容](https://docs.li.fi/zh-Hans/guides/intermediate-tokens#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![CN](https://d3gk2c5xim1je2.cloudfront.net/flags/CN.svg) 简体中文 搜索... ⌘K询问AI 搜索... Navigation 故障排除 中间令牌 [概述](https://docs.li.fi/zh-Hans/introduction/introduction) [API 参考](https://docs.li.fi/zh-hans-api-reference/introduction) [JS/TS SDK](https://docs.li.fi/zh-Hans/sdk/overview) [意图/求解器市场](https://docs.li.fi/zh-Hans/lifi-intents/introduction) [交换/桥接组件](https://docs.li.fi/zh-Hans/widget/overview) [指南](https://docs.li.fi/zh-Hans/guides/gas-subsidy) [Composer](https://docs.li.fi/zh-Hans/composer/overview) 在此页面 * [LI.FI中PARTIAL的工作方式](https://docs.li.fi/zh-Hans/guides/intermediate-tokens#li-fi%E4%B8%ADpartial%E7%9A%84%E5%B7%A5%E4%BD%9C%E6%96%B9%E5%BC%8F) * [桥接的中间代币](https://docs.li.fi/zh-Hans/guides/intermediate-tokens#%E6%A1%A5%E6%8E%A5%E7%9A%84%E4%B8%AD%E9%97%B4%E4%BB%A3%E5%B8%81) [​](https://docs.li.fi/zh-Hans/guides/intermediate-tokens#li-fi%E4%B8%ADpartial%E7%9A%84%E5%B7%A5%E4%BD%9C%E6%96%B9%E5%BC%8F) LI.FI中PARTIAL的工作方式 --------------------------------------------------------------------------------------------------------------------------------------------------- * 当您看到`status: DONE`与`substatus: PARTIAL`时,它表明转移已从LI.FI的角度完成,但用户没有在目标链上收到他们最初请求的确切代币。 * 本质上,LI.FI将预期输出与目标端的实际结果进行比较。对于任何确认了价值转移的路由,LI.FI执行类似于以下的检查: 复制 询问AI if isExpectedAsset and ( tool-specific isPartialValue(...) === true OR we saw a LiFiTransferRecovered event ) -> substatus = PARTIAL else if refunded -> substatus = REFUNDED else -> substatus = COMPLETED * * * [​](https://docs.li.fi/zh-Hans/guides/intermediate-tokens#%E6%A1%A5%E6%8E%A5%E7%9A%84%E4%B8%AD%E9%97%B4%E4%BB%A3%E5%B8%81) 桥接的中间代币 ------------------------------------------------------------------------------------------------------------------------------------- | 桥接 | 当我们标记DONE / PARTIAL | 见到的中间代币 | | --- | --- | --- | | Across | 没有原生部分;只有LiFiTransferRecovered边缘情况。 | Cake, DAI, ETH, USDC, USDC.e, USDT, USD₮0, USDT0, USDbC, WBTC, WETH, WLD, sUSD, ZRO, L3 | | Chainflip | 交换完成但也触发了退款出口(价值分割)。 | BTC, ETH, FLIP, USDC | | Mayan Fast MCTP | 临时回退到USDC,直到最后一跳执行。 | USDC | | Mayan MCTP | 与快速路由相同的回退行为。 | USDC | | Relay / RelayDepository | Relay报告退款并仍将资金发送到其他地方(跨链分割)。 | USDC, ETH, G | | Squid | Axelar交付与请求资产不匹配的axl\*代币。 | axlUSDC | | Stargate v2 | 由于流动性限制,池子以另一种美元稳定币或包装的气体代币退出。 | ETH, USDC, USDC.e, USDCe, USDC.n, USDC.e(Stargate), USDT, USDT0, USDt, USDT(Stargate), m.USDT, WETH | | Symbiosis | Symbiosis表示仍在路上的“过渡代币”。 | UETH, USDC, USDC.e, USDbC, WBNB, WETH, ETH, USDT | * * * [API 延迟和优化](https://docs.li.fi/zh-Hans/guides/latency) ⌘I 助手 AI生成的回答可能包含错误。 --- # Unknown \# LI.FI > LI.FI is the leading multi-chain liquidity aggregation platform that powers seamless cross-chain payments, swaps, and bridging. One integration provides access to 27 bridges, 31 exchanges, and intent-based solvers across 58 blockchains (EVM, Solana, Bitcoin, SUI). --- ## Canonical Page List (Priority Order) For AI agents, read these pages in order of relevance: 1. \*\*Agent Integration\*\* - https://docs.li.fi/agents/overview - Start here for AI agent integration 2. \*\*Concepts & Objects\*\* - https://docs.li.fi/agents/concepts - Core object definitions 3. \*\*Get Quote API\*\* - https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer - Primary endpoint 4. \*\*Check Status API\*\* - https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer - Track transfers 5. \*\*Error Codes\*\* - https://docs.li.fi/api-reference/error-codes - Handle errors 6. \*\*Status Tracking\*\* - https://docs.li.fi/introduction/user-flows-and-examples/status-tracking - Status flow details 7. \*\*Chains API\*\* - https://docs.li.fi/api-reference/get-information-about-all-currently-supported-chains - List chains 8. \*\*Tokens API\*\* - https://docs.li.fi/api-reference/fetch-all-known-tokens - List tokens 9. \*\*Tools API\*\* - https://docs.li.fi/api-reference/get-available-bridges-and-exchanges - List bridges/DEXs 10. \*\*Composer Overview\*\* - https://docs.li.fi/composer/overview - One-click DeFi operations (vaults, staking, lending) 11. \*\*Composer Quickstart\*\* - https://docs.li.fi/composer/quickstart - First Composer transaction in 5 minutes 12. \*\*Composer Supported Protocols\*\* - https://docs.li.fi/composer/reference/supported-protocols - 15 supported DeFi protocols --- ## Minimal Endpoint Set for Agents Base URL: \`https://li.quest/v1\` ### 1. GET /quote - Get transfer quote (MOST IMPORTANT) \`\`\` GET /v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=1000000&fromAddress=0x... \`\`\` Returns: Quote with \`transactionRequest\` ready for signing ### 2. GET /status - Check transfer status \`\`\` GET /v1/status?txHash=0x...&bridge=stargate&fromChain=1&toChain=42161 \`\`\` Returns: Status (NOT\_FOUND, PENDING, DONE, FAILED) with substatus ### 3. GET /chains - List supported chains \`\`\` GET /v1/chains?chainTypes=EVM \`\`\` Returns: Array of {id, key, name, chainType} ### 4. GET /tokens - List supported tokens \`\`\` GET /v1/tokens?chains=1,42161 \`\`\` Returns: Map of chainId to token arrays ### 5. GET /tools - List bridges and DEXs \`\`\` GET /v1/tools \`\`\` Returns: {bridges: \[...\], exchanges: \[...\]} --- ## Decision Rules for Agents ### When to use each endpoint: - \*\*Simple transfer\*\*: Use \`/quote\` directly - returns best route with tx data - \*\*Compare options\*\*: Use \`/advanced/routes\` - returns multiple routes - \*\*Track progress\*\*: Poll \`/status\` every 10-30 seconds until DONE or FAILED ### Status handling: \`\`\` PENDING → Keep polling DONE + COMPLETED → Success, exact tokens received DONE + PARTIAL → Success, but different token received (still full value) DONE + REFUNDED → Failed but user got funds back FAILED → Check error, may need user action \`\`\` ### Error recovery: - 429 (Rate limit): Exponential backoff, retry - No route found: Try different tokens or smaller amount - Slippage error: Increase slippage parameter (default 0.005) ### Common chain IDs: - Ethereum: 1 - Arbitrum: 42161 - Optimism: 10 - Base: 8453 - Polygon: 137 - BSC: 56 --- ## Overview LI.FI solves the multi-chain payment challenge by providing: - \*\*Universal liquidity access\*\* across all major blockchains - \*\*Smart routing\*\* that finds the cheapest and fastest path for any transfer - \*\*One integration\*\* that replaces dozens of chain-specific builds - \*\*Redundant routing\*\* with automatic fallbacks for reliability ### Pain Points Solved | Problem | Without LI.FI | With LI.FI | |---------|---------------|------------| | Cross-chain payments | Complex manual bridging | Single payment flow across all chains | | Token inconsistencies | Confusion & failed transactions | Canonical mapping ensures smooth payments | | Multiple APIs to maintain | Slow and costly | Unified API/SDK handles all chains | | Failed or stuck transfers | Bad UX & support tickets | Smart fallback = payment always succeeds | --- ## Products ### 1. LI.FI API The core REST API for cross-chain and same-chain operations. - \*\*Base URL\*\*: \`https://li.quest\` - \*\*Staging URL\*\*: \`https://staging.li.quest\` - \*\*OpenAPI Spec\*\*: https://raw.githubusercontent.com/lifinance/public-docs/main/openapi.yaml - \*\*AI Plugin\*\*: https://docs.li.fi/.well-known/ai-plugin.json #### Key Endpoints | Endpoint | Method | Description | |----------|--------|-------------| | \`/v1/quote\` | GET | Get a quote for cross-chain or same-chain swaps | | \`/v1/quote/contractCalls\` | POST | Get a quote with custom contract calls on destination | | \`/v1/advanced/routes\` | POST | Get multiple route options for a transfer | | \`/v1/advanced/stepTransaction\` | GET | Get transaction data for a specific route step | | \`/v1/status\` | GET | Check transaction status | | \`/v1/tokens\` | GET | List all supported tokens | | \`/v1/token\` | GET | Get specific token information | | \`/v1/chains\` | GET | List all supported chains | | \`/v1/tools\` | GET | List available bridges and exchanges | | \`/v1/connections\` | GET | Get possible token transfer connections | | \`/v1/gas/prices\` | GET | Get gas prices for all chains | | \`/v1/gas/suggestion\` | GET | Get gas suggestion for a specific chain | #### Example: Get a Cross-Chain Quote \`\`\` GET https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=USDC&toToken=USDC&fromAmount=100000000&fromAddress=0x... \`\`\` Returns: - Estimated output amount - Route details (bridge/DEX used) - Transaction calldata ready to execute - Gas estimates - Minimum amount received (slippage protected) ### 2. LI.FI SDK (JavaScript/TypeScript) Full-featured SDK for frontend and backend environments. - \*\*NPM Package\*\*: \`@lifi/sdk\` - \*\*Documentation\*\*: https://docs.li.fi/sdk/overview #### Features - All ecosystems, chains, bridges, exchanges, and solvers supported - Full cycle from routes/quotes to transaction execution - Event and hooks handling for execution tracking - Customizable settings (RPCs, allowed chains, tokens, bridges) - EIP-7702, EIP-5792, ERC-2612, EIP-712, Permit2 support - Tree-shaking and dead-code elimination for minimal bundle size - Arbitrary contract calls on destination chain - Viem, Wallet Standard, Bigmi compatibility #### Installation \`\`\`bash npm install @lifi/sdk # or yarn add @lifi/sdk # or pnpm add @lifi/sdk \`\`\` #### Quick Start \`\`\`typescript import { createConfig, getQuote, executeRoute } from "@lifi/sdk"; createConfig({ integrator: "YourAppName" }); const quote = await getQuote({ fromChain: 1, toChain: 42161, fromToken: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", // USDC on Ethereum toToken: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831", // USDC on Arbitrum fromAmount: "100000000", fromAddress: "0x...", }); await executeRoute(quote, { updateRouteHook: (route) => console.log(route) }); \`\`\` ### 3. LI.FI Widget Embeddable UI components for cross-chain swapping and bridging. - \*\*NPM Package\*\*: \`@lifi/widget\` - \*\*Playground\*\*: https://playground.li.fi - \*\*Documentation\*\*: https://docs.li.fi/widget/overview #### Features - Embeddable variants: compact, wide, drawer - Pre-configured themes with dark mode - Customizable chains, tokens, bridges, exchanges - Transaction progress and history views - Wallet lists and bookmarks - Complete UI translations - Compatible with React, Next.js, Vue, Nuxt, Svelte, Remix, Gatsby, Vite #### Installation \`\`\`bash npm install @lifi/widget \`\`\` ### 4. LI.FI Intent / Solver Marketplace Intent-based execution where solvers compete to fulfill cross-chain transfers. - \*\*Documentation\*\*: https://docs.li.fi/lifi-intents/introduction - \*\*Foundation\*\*: Official foundation of the Open Intents Framework (OIF) #### How It Works 1. \*\*User expresses intent\*\*: Deposits tokens into a resource lock 2. \*\*Intent distributed\*\*: Lock generates proof, broadcast to order server 3. \*\*Solvers compete\*\*: Network of solvers submit competitive quotes 4. \*\*Execution\*\*: Winning solver delivers assets on destination chain 5. \*\*Settlement\*\*: Delivery verified, locked funds released to solver #### Currently Supported - \*\*Chains\*\*: Ethereum, Arbitrum, Base - \*\*Same-chain pairs\*\*: USDC-ETH, USDT-ETH - \*\*Cross-chain pairs\*\*: USDC-USDC, USDT-USDT, ETH-ETH #### Key Concepts - \*\*Intents\*\*: User requests expressing desired outcome without specifying how - \*\*Solvers\*\*: Entities competing to fill orders using their own capital - \*\*Resource Locks\*\*: Smart contracts that securely escrow user funds - \*\*Order Server\*\*: Marketplace matching intents with solvers - \*\*Output Settler\*\*: Records delivery on destination chain - \*\*Oracle\*\*: Transmits proof of delivery to source chain - \*\*Input Settler\*\*: Verifies proofs and releases funds --- ## LI.FI Composer (Zaps) Composer enables one-click execution of multiple on-chain actions across chains. - \*\*Also known as\*\*: Contract calls, Zaps, Transaction orchestration - \*\*Documentation Hub\*\*: https://docs.li.fi/composer/overview ### Composer Documentation Pages | Page | URL | Description | |------|-----|-------------| | Overview | https://docs.li.fi/composer/overview | What Composer is, benefits, integration paths | | Quickstart | https://docs.li.fi/composer/quickstart | Execute your first Composer transaction in 5 minutes | | How It Works | https://docs.li.fi/composer/how-it-works | Architecture: Onchain VM, eDSL, transaction lifecycle | | API Integration | https://docs.li.fi/composer/guides/api-integration | Integrate Composer via REST API | | SDK Integration | https://docs.li.fi/composer/guides/sdk-integration | Integrate Composer via TypeScript SDK | | Widget Integration | https://docs.li.fi/composer/guides/widget-integration | Composer in the LI.FI Widget | | Cross-Chain Patterns | https://docs.li.fi/composer/guides/cross-chain-compose | Multi-chain DeFi operations | | Vault Deposit Recipes | https://docs.li.fi/composer/recipes/vault-deposits | Morpho, Euler, Pendle vault recipes | | Staking Recipes | https://docs.li.fi/composer/recipes/staking | Lido wstETH, EtherFi, Kinetiq recipes | | Lending Recipes | https://docs.li.fi/composer/recipes/lending | Aave V3, HyperLend, Seamless recipes | | Multi-Step Recipes | https://docs.li.fi/composer/recipes/multi-step | Bridge + deposit, swap + bridge + stake | | Supported Protocols | https://docs.li.fi/composer/reference/supported-protocols | Full protocol list with capabilities | | API Parameters | https://docs.li.fi/composer/reference/api-parameters | Composer-specific API parameters | | Error Handling | https://docs.li.fi/composer/reference/error-handling | Failure modes and recovery | | Limitations | https://docs.li.fi/composer/reference/limitations | Current constraints (EVM-only, tokenised positions) | | Protocol Integration | https://docs.li.fi/composer/for-protocols/integration-guide | How to get your protocol integrated | | Technical Requirements | https://docs.li.fi/composer/for-protocols/technical-requirements | Technical requirements for integration | ### What Composer Does Transform multi-step, multi-chain operations into a single transaction: \*\*Traditional Flow\*\* (4+ transactions, 2+ websites): 1. Bridge ETH from Ethereum to Base 2. Swap ETH to USDC on Base 3. Approve USDC for Morpho 4. Deposit into Morpho vault \*\*Composer Flow\*\* (1 transaction, 1 click): - All of the above in a single atomic operation ### Key Benefits - \*\*Single Transaction\*\*: Multiple actions in one tx, one signature - \*\*Cost Efficiency\*\*: Reduced gas by batching - \*\*Atomic Execution\*\*: All-or-nothing on same-chain operations - \*\*Pre-execution Simulation\*\*: Certainty about outcomes before signing ### Supported Actions - \*\*Swapping tokens\*\* via DEXs - \*\*Depositing into vaults\*\* (lending, yield) - \*\*Staking\*\* (LSTs, restaking protocols) - \*\*Cross-chain protocol access\*\* ### Supported Protocols (15) 1. Morpho V1 and V2 (deposit, withdraw) 2. Aave V3 (deposit, withdraw) 3. Kinetiq (deposit only) 4. Kinetiq Earn / vkHYPE (deposit only) 5. Euler (deposit, withdraw) 6. Ethena - USDe/sUSDe, ENA/sENA (deposit only) 7. Felix Vanilla (deposit, withdraw) 8. HyperLend (deposit, withdraw) 9. Pendle (deposit, withdraw) 10. Maple (deposit only) 11. Neverland (deposit, withdraw) 12. Lido wstETH (deposit, withdraw) 13. EtherFi (deposit, withdraw) 14. USDai (deposit, withdraw) 15. Seamless (deposit, withdraw) ### How to Use Composer Set \`toToken\` to a vault/staking/deposit token address from a supported protocol. That's the only Composer-specific detail — everything else is identical to a standard LI.FI swap or bridge request. ### Example: Deposit USDC into Morpho Vault on Base \`\`\`bash curl -X GET 'https://li.quest/v1/quote?fromChain=8453&toChain=8453&fromToken=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&toToken=0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A&fromAddress=0x...&fromAmount=1000000' \`\`\` ### Example: Cross-Chain ETH on Ethereum → Morpho Vault on Base \`\`\`bash curl -X GET 'https://li.quest/v1/quote?fromChain=1&toChain=8453&fromToken=0x0000000000000000000000000000000000000000&toToken=0x7BfA7C4f149E7415b73bdeDfe609237e29CBF34A&fromAddress=0x...&fromAmount=100000000000000000' \`\`\` ### Limitations - EVM chains only (no Solana or non-EVM) - Tokenised positions only (protocol must return a token upon deposit) - Some protocols are deposit-only (Kinetiq, Ethena, Maple) --- ## Supported Ecosystems ### Blockchains (35+) \*\*EVM Chains\*\*: - Ethereum, Arbitrum, Optimism, Base, Polygon, Avalanche, BSC, Fantom, Gnosis - zkSync Era, Polygon zkEVM, Linea, Scroll, Mantle, Mode, Blast - Celo, Aurora, Moonbeam, Moonriver, Metis, Boba, Fuse - And many more... \*\*Non-EVM\*\*: - \*\*Solana\*\*: Full support for SPL tokens and Solana programs - \*\*Bitcoin\*\*: Native BTC swaps and bridging - \*\*SUI\*\*: Move-based chain support ### Bridges Aggregated Stargate, Across, Hop, Celer cBridge, Multichain, Connext, Synapse, Hyphen, Allbridge, Wormhole, LayerZero, Axelar, deBridge, Symbiosis, Router Protocol, Orbiter, Relay, and more. ### DEX Aggregators 1inch, 0x, Paraswap, KyberSwap, OpenOcean, DODO, Odos, Jupiter (Solana), and more. ### Solvers LI.FI Solver, Enso, Propeller Heads, Bungee, and growing network. --- ## Architecture ### System Components 1. \*\*dApp Interface\*\*: User-facing applications integrate LI.FI API/SDK 2. \*\*LI.FI API\*\*: Off-chain aggregation and smart order routing 3. \*\*LI.FI Diamond Contract\*\*: On-chain entry point using diamond pattern (EIP-2535) 4. \*\*Facet Contracts\*\*: Modular contracts for bridges, DEXs, solvers 5. \*\*Bridge/DEX/Solver Contracts\*\*: Final execution on respective protocols ### Order Flow 1. User requests quote from dApp 2. LI.FI API queries bridges, DEXs, solvers for pricing 3. Optimal route returned to dApp 4. User approves and signs transaction 5. Diamond contract routes to appropriate facet 6. Facet executes via underlying protocol 7. Assets delivered to user ### Smart Contracts - \*\*Diamond Pattern\*\*: Upgradeable, modular architecture - \*\*Facets\*\*: Separate contracts for each bridge/DEX integration - \*\*Executor\*\*: Handles complex multi-step transactions - \*\*Receiver\*\*: Manages incoming cross-chain transfers Contract addresses: https://docs.li.fi/introduction/lifi-architecture/smart-contract-addresses --- ## Integration Guides ### Getting Started 1. \*\*API Introduction\*\*: https://docs.li.fi/api-reference/introduction 2. \*\*SDK Installation\*\*: https://docs.li.fi/sdk/installing-the-sdk 3. \*\*Widget Setup\*\*: https://docs.li.fi/widget/install-widget ### Common Flows - \*\*Request a Quote\*\*: https://docs.li.fi/api-reference/get-a-quote-for-a-token-transfer - \*\*Execute a Swap\*\*: https://docs.li.fi/sdk/execute-routes - \*\*Track Status\*\*: https://docs.li.fi/api-reference/check-the-status-of-a-cross-chain-transfer - \*\*Handle Errors\*\*: https://docs.li.fi/api-reference/error-codes ### Advanced Topics - \*\*Composer (Zaps)\*\*: https://docs.li.fi/composer/overview - \*\*Solana Integration\*\*: https://docs.li.fi/introduction/lifi-architecture/solana-overview - \*\*Bitcoin Integration\*\*: https://docs.li.fi/introduction/lifi-architecture/bitcoin-overview - \*\*Intents/Solvers\*\*: https://docs.li.fi/lifi-intents/introduction ### Monetization Integrators can charge fees on transactions: - \*\*Documentation\*\*: https://docs.li.fi/introduction/integrating-lifi/monetizing-integration - \*\*Fee Collection\*\*: Fees taken from source token - \*\*Withdrawal\*\*: Direct withdrawal or LI.FI consolidation service --- ## Key Concepts ### Quote vs Route - \*\*Quote\*\*: Single optimized route with ready-to-execute transaction data - \*\*Route\*\*: Path from source to destination, may require additional step data ### Steps and Actions - \*\*Step\*\*: Individual operation in a route (swap, bridge, or combined) - \*\*Action\*\*: Specific operation type within a step ### Slippage - \*\*Auto slippage\*\*: LI.FI picks suitable buffer by asset liquidity - \*\*Default\*\*: ~0.5% with minimum slightly below estimate - \*\*Minimum received\*\*: Enforced on-chain, reverts if not met ### Transaction Types - \*\*Same-chain swap\*\*: Atomic, reverts entirely on failure - \*\*Cross-chain\*\*: Bridge can succeed while destination swap fails - \*\*Partial completion\*\*: User refunded in bridged asset on destination --- ## Rate Limits - \*\*Default\*\*: 10 requests/second per IP - \*\*With API Key\*\*: Higher limits available - \*\*Request Key\*\*: https://docs.li.fi/api-reference/rate-limits --- ## Security - \*\*Audited\*\*: Multiple security audits by leading firms - \*\*Non-custodial\*\*: Users maintain control of funds - \*\*Transparent\*\*: Open-source smart contracts - \*\*Details\*\*: https://docs.li.fi/introduction/learn-more/security-and-audits --- ## Use Cases 1. \*\*Cross-chain payments\*\*: Accept payments in any token on any chain 2. \*\*DEX aggregation\*\*: Best swap rates across all DEXs 3. \*\*Bridge aggregation\*\*: Optimal cross-chain transfers 4. \*\*DeFi zaps\*\*: One-click deposits into any protocol 5. \*\*Gas abstraction\*\*: Pay gas in any token 6. \*\*Intent execution\*\*: Competitive solver marketplace 7. \*\*Portfolio rebalancing\*\*: Move assets across chains efficiently 8. \*\*NFT purchases\*\*: Cross-chain NFT buying 9. \*\*Wallet integration\*\*: Embedded swap/bridge functionality --- ## Resources ### Documentation - \*\*Main Docs\*\*: https://docs.li.fi - \*\*API Reference\*\*: https://docs.li.fi/api-reference - \*\*SDK Guide\*\*: https://docs.li.fi/sdk/overview - \*\*Widget Guide\*\*: https://docs.li.fi/widget/overview - \*\*Intents\*\*: https://docs.li.fi/lifi-intents/introduction - \*\*FAQs\*\*: https://docs.li.fi/guides/fees-monetization/faq ### NPM Packages - \*\*SDK\*\*: https://www.npmjs.com/package/@lifi/sdk - \*\*Widget\*\*: https://www.npmjs.com/package/@lifi/widget - \*\*Types\*\*: https://www.npmjs.com/package/@lifi/types ### Tools - \*\*Widget Playground\*\*: https://playground.li.fi - \*\*Transaction Explorer\*\*: https://explorer.li.fi ### Support - \*\*Website\*\*: https://li.fi - \*\*Discord\*\*: https://discord.gg/lifi - \*\*Twitter\*\*: https://twitter.com/lifiprotocol - \*\*Email\*\*: support@li.fi - \*\*Help Center\*\*: https://lifihelp.zendesk.com ### Legal - \*\*Terms\*\*: https://li.fi/legal/terms-and-conditions/ - \*\*Privacy\*\*: https://li.fi/legal/privacy-policy/ --- ## Changelog Track updates to LI.FI products: - \*\*Backend\*\*: https://docs.li.fi/changelog/backend - \*\*SDK\*\*: https://docs.li.fi/changelog/sdk - \*\*Widget\*\*: https://docs.li.fi/changelog/widget --- # 速率限制和 API 身份验证 - LI.FI [跳转到主要内容](https://docs.li.fi/zh-hans-api-reference/rate-limits#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![CN](https://d3gk2c5xim1je2.cloudfront.net/flags/CN.svg) 简体中文 搜索... ⌘K询问AI 搜索... Navigation 关于 API 速率限制和 API 身份验证 [概述](https://docs.li.fi/zh-Hans/introduction/introduction) [API 参考](https://docs.li.fi/zh-hans-api-reference/introduction) [JS/TS SDK](https://docs.li.fi/zh-Hans/sdk/overview) [意图/求解器市场](https://docs.li.fi/zh-Hans/lifi-intents/introduction) [交换/桥接组件](https://docs.li.fi/zh-Hans/widget/overview) [指南](https://docs.li.fi/zh-Hans/guides/gas-subsidy) [Composer](https://docs.li.fi/zh-Hans/composer/overview) 在此页面 * [当前速率限制](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%BD%93%E5%89%8D%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6) * [未认证](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%9C%AA%E8%AE%A4%E8%AF%81) * [已认证](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%B7%B2%E8%AE%A4%E8%AF%81) * [处理速率限制](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%A4%84%E7%90%86%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6) * [请求响应中的速率限制信息](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E8%AF%B7%E6%B1%82%E5%93%8D%E5%BA%94%E4%B8%AD%E7%9A%84%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E4%BF%A1%E6%81%AF) * [最佳实践](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5) * [滥用预防](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%BB%A5%E7%94%A8%E9%A2%84%E9%98%B2) * [使用 API 密钥](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E4%BD%BF%E7%94%A8-api-%E5%AF%86%E9%92%A5) * [需要更高的限制?](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E9%9C%80%E8%A6%81%E6%9B%B4%E9%AB%98%E7%9A%84%E9%99%90%E5%88%B6%EF%BC%9F) 为了减少滥用并管理我们 API 的容量,我们对 LI.FI API 使用实施了限制。 速率限制适用于使用您的 `x-lifi-api-key` 发出的请求,并按 API 密钥跨所有端点计算。这些限制有助于防止滥用并确保每个人的流畅体验。 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%BD%93%E5%89%8D%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6) 当前速率限制 ========================================================================================================================== 生产使用的默认速率限制如下: ### [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%9C%AA%E8%AE%A4%E8%AF%81) 未认证 | 端点范围 | 速率限制 | | --- | --- | | 报价相关端点 | 每两小时 200 个请求 | | 其他端点 | 每两小时 200 个请求 | ### [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%B7%B2%E8%AE%A4%E8%AF%81) 已认证 | 端点范围 | 速率限制 | | --- | --- | | 报价相关端点 | 每分钟 200 个请求 | | 其他端点 | 每分钟 200 个请求 | 速率限制在两小时窗口内强制执行,以应对流量峰值 > 🔒 企业客户可能有更高的限制。请查看我们的[计划页面](https://li.fi/plans/) > 了解更多详情。 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E5%A4%84%E7%90%86%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6) 处理速率限制 ========================================================================================================================== 每个响应都在标头中包含您当前的速率限制。请记住,限制可能因端点而异。 在合作伙伴门户中,您会看到每分钟请求数 (RPM) 限制。为了在峰值期间给您灵活性,我们不会逐分钟强制执行。相反,我们将您的 RPM 乘以 120 并将其应用为两小时滚动窗口。 👉 示例:如果您的限制是 100 RPM,这意味着您可以在任何两小时窗口内最多发出 12,000 个请求——要么一次性发出,要么按您喜欢的方式分散。 ### [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E8%AF%B7%E6%B1%82%E5%93%8D%E5%BA%94%E4%B8%AD%E7%9A%84%E9%80%9F%E7%8E%87%E9%99%90%E5%88%B6%E4%BF%A1%E6%81%AF) 请求响应中的速率限制信息 `ratelimit-reset`:速率限制将在多少秒后重置(2 小时等于 7200) `ratelimit-limit`:2 小时期间的总限制 `ratelimit-remaining`:重置前还剩多少限制 以下是计算平均 RPM 的方法: `(ratelimit-limit - ratelimit-remaining) / ((7200 - ratelimit-reset) / 60)` 如果您超过速率限制,您将收到 `429 Too Many Requests` HTTP 响应。当这种情况发生时: * 您将收到一个错误消息,显示速率限制何时解除(例如,5 小时) * 请求更高的速率限制 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5) 最佳实践 ====================================================================================================== 为避免达到速率限制: * 缓存来自 `GET /tokens`、`GET /chains` 和静态端点的结果 * 避免频繁轮询相同的数据 * 批处理或防抖触发 API 调用的用户输入 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E6%BB%A5%E7%94%A8%E9%A2%84%E9%98%B2) 滥用预防 ====================================================================================================== 为防止滥用,LI.FI 可能会暂时阻止以下密钥: * 持续超过速率限制 * 尝试通过多个密钥或 IP 绕过限制 * 导致服务性能下降 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E4%BD%BF%E7%94%A8-api-%E5%AF%86%E9%92%A5) 使用 API 密钥 ================================================================================================================ 所有 LI.FI API 都不需要 API 密钥。API 密钥仅用于更高的速率限制 LI.FI API 的身份验证通过自定义 HTTP 标头 `x-lifi-api-key` 和 API 密钥执行。如果您使用客户端 SDK,您将在[创建配置](https://docs.li.fi/zh-Hans/sdk/configure-sdk) 时设置 API,然后 SDK 将在每个请求中代表您发送标头。如果直接与 API 集成,您需要自己发送此标头,如下所示: 复制 询问AI curl --location 'https://li.quest/v1/quote?fromChain=100&fromAmount=1000000&fromToken=0x4ecaba5870353805a9f068101a40e0f32ed605c6&fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&toChain=137&toToken=0x2791bca1f2de4661ed88a30c99a7a9449aa84174&slippage=0.03' \ --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' 可以使用以下端点测试 API 密钥: 复制 询问AI curl --location 'https://li.quest/v1/keys/test' --header 'x-lifi-api-key: YOUR_CUSTOM_KEY' 永远不要在客户端环境中暴露您的 `x-lifi-api-key`,例如基于浏览器的 JavaScript 或直接的小部件集成。在客户端使用 API 密钥可能导致未经授权的使用或滥用您的密钥,因为它会在浏览器的开发者工具或网络标签中公开可见。 如果您使用 LI.FI 小部件,您**不需要传递 API 密钥**。小部件在前端安全运行,无需密钥。对于服务器端集成(例如 SDK 或来自后端的 API 请求),请始终保持您的密钥机密和安全。 [​](https://docs.li.fi/zh-hans-api-reference/rate-limits#%E9%9C%80%E8%A6%81%E6%9B%B4%E9%AB%98%E7%9A%84%E9%99%90%E5%88%B6%EF%BC%9F) 需要更高的限制? ============================================================================================================================================== 如果您正在构建高容量集成或生产级产品,我们很乐意支持您的扩展需求。 请查看我们的[计划页面](https://li.fi/plans/) 了解更多详情。 [概述](https://docs.li.fi/zh-hans-api-reference/introduction) [错误代码](https://docs.li.fi/zh-hans-api-reference/error-codes) ⌘I 助手 AI生成的回答可能包含错误。 --- # 返回基于源链或目标链的所有可能连接 - LI.FI [跳转到主要内容](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#content-area) [LI.FI home page![light logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/light.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=f435348680e682acea6e3b9af339ed7a)![dark logo](https://mintcdn.com/lifi/EmProAEgMrruLUbI/logo/dark.png?fit=max&auto=format&n=EmProAEgMrruLUbI&q=85&s=d02539147db168291d7c711beb45d10b)](https://docs.li.fi/) ![CN](https://d3gk2c5xim1je2.cloudfront.net/flags/CN.svg) 简体中文 搜索... ⌘K询问AI 搜索... Navigation 连接 返回基于源链或目标链的所有可能连接 [概述](https://docs.li.fi/zh-Hans/introduction/introduction) [API 参考](https://docs.li.fi/zh-hans-api-reference/introduction) [JS/TS SDK](https://docs.li.fi/zh-Hans/sdk/overview) [意图/求解器市场](https://docs.li.fi/zh-Hans/lifi-intents/introduction) [交换/桥接组件](https://docs.li.fi/zh-Hans/widget/overview) [指南](https://docs.li.fi/zh-Hans/guides/gas-subsidy) [Composer](https://docs.li.fi/zh-Hans/composer/overview) Returns all possible connections based on a from- or toChain. cURL 复制 询问AI curl --request GET \ --url https://li.quest/v1/connections 200 复制 询问AI { "connections": [\ {\ "fromChainId": 137,\ "toChainId": 1,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 1,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x6b175474e89094c44da98b954eedeac495271d0f/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 1,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 1,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xdac17f958d2ee523a2206206994597c13d831ec7/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 10,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 10,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0xda10009cbd5d07dd0cecc66161fc93d7c9000da1/45965130df45ecf234ff03ce28299cd1.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 10,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/op/d61441782d4a08a7479d54aea211679e.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 10,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x7f5c764cbc14f9669b88837ca1490cca17c31607/773a0161709a55edc211c3fa67f7c1a7.png",\ "priceUSD": "1"\ },\ {\ "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 10,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x94b008aa00579c1307b0ef2c499ad98a8ce58e58/37c9c2ddceb0c83f0f4c07ea4fa53e9d.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 56,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 56,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 56,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x2170ed0880ac9a755fd29b2688956bd959f933f8/80dd95753396b5619cf84b0df135eae5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",\ "decimals": 18,\ "symbol": "USDC",\ "chainId": 56,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x8ac76a51cc950d9822d68b83f0e1ad97b32cd580d/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0x55d398326f99059ff775485246999027b3197955",\ "decimals": 18,\ "symbol": "USDT",\ "chainId": 56,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x55d398326f99059ff775485246999027b3197955/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ }\ ] } GET https://li.questhttps://staging.li.quest / v1 / connections 试一试 Returns all possible connections based on a from- or toChain. cURL 复制 询问AI curl --request GET \ --url https://li.quest/v1/connections 200 复制 询问AI { "connections": [\ {\ "fromChainId": 137,\ "toChainId": 1,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x6b175474e89094c44da98b954eedeac495271d0f",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 1,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0x6b175474e89094c44da98b954eedeac495271d0f/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 1,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/token/logo_url/eth/935ae4e4d1d12d59a99717a24f2540b5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 1,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0xdac17f958d2ee523a2206206994597c13d831ec7",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 1,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/eth_token/logo_url/0xdac17f958d2ee523a2206206994597c13d831ec7/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 10,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0xda10009cbd5d07dd0cecc66161fc93d7c9000da1",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 10,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0xda10009cbd5d07dd0cecc66161fc93d7c9000da1/45965130df45ecf234ff03ce28299cd1.png",\ "priceUSD": "1"\ },\ {\ "address": "0x0000000000000000000000000000000000000000",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 10,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/op/d61441782d4a08a7479d54aea211679e.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x7f5c764cbc14f9669b88837ca1490cca17c31607",\ "decimals": 6,\ "symbol": "USDC",\ "chainId": 10,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x7f5c764cbc14f9669b88837ca1490cca17c31607/773a0161709a55edc211c3fa67f7c1a7.png",\ "priceUSD": "1"\ },\ {\ "address": "0x94b008aa00579c1307b0ef2c499ad98a8ce58e58",\ "decimals": 6,\ "symbol": "USDT",\ "chainId": 10,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/op_token/logo_url/0x94b008aa00579c1307b0ef2c499ad98a8ce58e58/37c9c2ddceb0c83f0f4c07ea4fa53e9d.png",\ "priceUSD": "1"\ }\ ]\ },\ {\ "fromChainId": 137,\ "toChainId": 56,\ "fromTokens": [\ {\ "address": "0x8f3cf7ad23cd3cadbd9735aff958023239c6a063",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 137,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/matic_token/logo_url/0x8f3cf7ad23cd3cadbd9735aff958023239c6a063/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ }\ ],\ "toTokens": [\ {\ "address": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",\ "decimals": 18,\ "symbol": "DAI",\ "chainId": 56,\ "coinKey": "DAI",\ "name": "DAI",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3/549c4205dbb199f1b8b03af783f35e71.png",\ "priceUSD": "1"\ },\ {\ "address": "0x2170ed0880ac9a755fd29b2688956bd959f933f8",\ "decimals": 18,\ "symbol": "ETH",\ "chainId": 56,\ "coinKey": "ETH",\ "name": "ETH",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x2170ed0880ac9a755fd29b2688956bd959f933f8/80dd95753396b5619cf84b0df135eae5.png",\ "priceUSD": "2582.35"\ },\ {\ "address": "0x8ac76a51cc950d9822d68b83fe1ad97b32cd580d",\ "decimals": 18,\ "symbol": "USDC",\ "chainId": 56,\ "coinKey": "USDC",\ "name": "USDC",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x8ac76a51cc950d9822d68b83f0e1ad97b32cd580d/fffcd27b9efff5a86ab942084c05924d.png",\ "priceUSD": "1"\ },\ {\ "address": "0x55d398326f99059ff775485246999027b3197955",\ "decimals": 18,\ "symbol": "USDT",\ "chainId": 56,\ "coinKey": "USDT",\ "name": "USDT",\ "logoURI": "https://static.debank.com/image/bsc_token/logo_url/0x55d398326f99059ff775485246999027b3197955/66eadee7b7bb16b75e02b570ab8d5c01.png",\ "priceUSD": "1"\ }\ ]\ }\ ] } #### 请求头 [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-x-lifi-api-key) x-lifi-api-key string Authentication header, register in the LI.FI Partner Portal ([https://portal.li.fi/](https://portal.li.fi/) ) to get your API Key. #### 查询参数 [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-from-chain) fromChain string The chain that should be the start of the possible connections. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-to-chain) toChain string The chain that should be the end of the possible connections. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-from-token) fromToken string Only return connections starting with this token. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-to-token) toToken string Only return connections ending with this token. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-chain-types) chainTypes string Restrict the resulting tokens to the given chainTypes. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-bridges) allowBridges string\[\] List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-deny-bridges) denyBridges string\[\] List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-prefer-bridges) preferBridges string\[\] List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-exchanges) allowExchanges string\[\] List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-deny-exchanges) denyExchanges string\[\] List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-prefer-exchanges) preferExchanges string\[\] List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-switch-chain) allowSwitchChain boolean 默认值:true Whether connections that require chain switch should be included in the response. [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#parameter-allow-destination-call) allowDestinationCall boolean 默认值:true Whether connections that includes destination call should be included in the response. #### 响应 200 - application/json [​](https://docs.li.fi/zh-hans-api-reference/returns-all-possible-connections-based-on-a-from-or-tochain#response-connections) connections Root Type for Connection · object\[\] The possible connections 显示 子属性 [获取可用的桥接器和交易所](https://docs.li.fi/zh-hans-api-reference/get-available-bridges-and-exchanges) [获取指定链 ID 的 Gas 价格](https://docs.li.fi/zh-hans-api-reference/gas/get-gas-price-for-the-specified-chainid) ⌘I 助手 AI生成的回答可能包含错误。 ---