Skip to main content

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:

When to Use What

Use CaseRecommendedWhy
Execute transfers from backendAPIDirect HTTP calls, full control
Build frontend with swapsSDKHandles wallets, signing, execution
Embed ready-made UIWidgetZero-code, instant deployment
AI agent integrationAPISimple HTTP, no dependencies
For AI agents, the REST API is recommended since it requires only HTTP calls without additional dependencies.

Minimal Endpoint Set

These 5 endpoints cover most agent use cases:

1. Get a Quote

Returns a ready-to-execute transaction for transferring tokens.
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

2. Check Transfer Status

Poll this endpoint to track cross-chain transfer progress.
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

3. List Supported Chains

Get all chains LI.FI supports.
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.

4. List Supported Tokens

Get tokens available for a specific chain.
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.

5. List Available Tools

Get bridges and DEXs available for routing.
GET https://li.quest/v1/tools
Returns: Object with bridges and exchanges arrays, each containing key, name, and supportedChains.

Decision Rules

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

Handling Status Responses

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

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)

Common Chain IDs

ChainIDKey
Ethereum1eth
Arbitrum42161arb
Optimism10opt
Base8453bas
Polygon137pol
BSC56bsc
Avalanche43114ava
Solana1151111081099710sol

Common Token Addresses

TokenEthereumArbitrumBase
USDC0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB480xaf88d065e77c8cC2239327C5EDb3A432268e58310x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
USDT0xdAC17F958D2ee523a2206206994597C13D831ec70xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9-
WETH0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc20x82aF49447D8a07e3bd95BD0d56f35241523fBab10x4200000000000000000000000000000000000006
Use token symbols (USDC, ETH) for convenience - the API resolves them to addresses automatically.

Next Steps