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 the entry point for AI agents that need to execute token transfers, check transaction status, or query supported chains and tokens. Whether you work directly with the REST API or connect through the LI.FI MCP Server, you get access to the same powerful routing engine.
Machine-readable resources:

When to Use What

For AI agents running inside MCP-compatible hosts like Claude, Cursor, or Windsurf, the LI.FI MCP Server is the most streamlined option — it exposes every core endpoint as a discoverable tool with typed parameters so the agent never has to construct raw HTTP requests. Agents that prefer lower token usage can use the LI.FI CLI instead — its human-readable output is more compact than raw API JSON, reducing context window consumption while still providing full access to quotes, routes, and status tracking. For all other agents, the REST API is recommended since it requires only HTTP calls without additional dependencies. LI.FI capabilities are also published as pre-built agent skills on ClawHub, skills.sh, and Playbooks, so you can add cross-chain execution to your agent as a native capability without writing integration code.

Minimal Endpoint Set

These 5 endpoints cover most agent use cases:

1. Get a Quote

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

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)

Rate Limits

Agents that poll status or execute high-frequency workflows should request an API key to avoid throttling.

Common Chain IDs

Common Token Addresses

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

Next Steps

MCP Server

Connect AI tools directly to LI.FI with zero-config tool discovery

CLI

Token-efficient alternative to MCP — compact output, lower context usage

Concepts & Objects

Understand Quote, Route, Step, Status, and other core objects

API Reference

Complete API documentation with all endpoints

Error Codes

Handle errors gracefully

Status Tracking

Detailed guide on monitoring transfers

LI.FI's API for Agentic Commerce

Read the full vision behind LI.FI’s agent infrastructure