The LI.FI CLI exposes the following commands, organized by category. Each command maps to a corresponding LI.FI API endpoint.
tokens
Retrieve tokens supported by LI.FI on a specific chain.
lifi tokens --chain 1 # List tokens on Ethereum
lifi tokens --chain 1 --min-price 100 # Filter by min USD price
| Flag | Required | Description |
|---|
--chain | Yes | Chain ID to list tokens for |
--min-price | No | Minimum token price in USD |
token
Get details about a specific token including price, decimals, and contract address.
lifi token 1 USDC # By symbol
lifi token 1 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 # By address
| Argument | Required | Description |
|---|
chain | Yes | Chain ID (e.g., 1) |
token | Yes | Token symbol or contract address |
chains
List all supported blockchain networks.
lifi chains # List all supported chains
lifi chains --type EVM # Filter by chain type
| Flag | Required | Description |
|---|
--type | No | Filter by chain type (e.g., EVM, SVM) |
chain
Get details for a specific chain by ID or name.
lifi chain 42161 # By chain ID
lifi chain arbitrum # By name (case-insensitive)
| Argument | Required | Description |
|---|
chain | Yes | Chain ID or name |
Quote & Swap
quote
Get the best route for a swap. Returns the optimal route, fees, estimated time, and a transactionRequest object ready for signing.
lifi quote \
--from ethereum --to arbitrum \
--from-token USDC --to-token USDC \
--amount 1000000000 \
--from-address 0xd8dA...
Run without flags to enter interactive mode:
| Flag | Required | Description |
|---|
--from | Yes | Source chain ID or name |
--to | Yes | Destination chain ID or name |
--from-token | Yes | Source token address or symbol |
--to-token | Yes | Destination token address or symbol |
--amount | Yes | Amount in smallest unit (e.g., wei) |
--from-address | Yes | Sender wallet address |
--order | No | Route preference: RECOMMENDED, FASTEST, CHEAPEST, SAFEST |
The response includes a transactionRequest object with to, data, value, gasLimit, and chainId fields, ready to sign and broadcast with any wallet.
routes
Get multiple route options for comparison.
lifi routes \
--from 1 --to 42161 \
--from-token USDC --to-token USDC \
--amount 1000000000 \
--order CHEAPEST
| Flag | Required | Description |
|---|
--from | Yes | Source chain ID |
--to | Yes | Destination chain ID |
--from-token | Yes | Source token address or symbol |
--to-token | Yes | Destination token address or symbol |
--amount | Yes | Amount in smallest unit |
--order | No | Route preference: RECOMMENDED, FASTEST, CHEAPEST, SAFEST |
Transaction Status
status
Track the progress of a cross-chain transfer.
lifi status 0xabc123... # One-shot status check
lifi status 0xabc123... --watch # Poll until complete/failed
lifi status 0xabc123... --bridge hop # Speed up lookup with bridge hint
| Argument / Flag | Required | Description |
|---|
txHash | Yes | Transaction hash from the source chain |
--watch | No | Poll until the transfer completes or fails |
--bridge | No | Bridge name from the quote (speeds up lookup) |
Connections
connections
Check available swap routes between chains.
lifi connections # All connections
lifi connections --from-chain 1 --to-chain 42161 # Specific pair
| Flag | Required | Description |
|---|
--from-chain | No | Source chain ID |
--to-chain | No | Destination chain ID |
List available bridges and DEXes.
lifi tools # List all bridges and DEXes
lifi tools --chain 1 # Filter by chain
| Flag | Required | Description |
|---|
--chain | No | Chain ID to filter results |
Gas
gas
Get current gas prices and suggestions.
lifi gas # Gas prices for all chains
lifi gas 1 # Detailed gas suggestion for Ethereum
| Argument | Required | Description |
|---|
chainId | No | Chain ID for detailed gas suggestion |
API Key Management
auth show
Display the currently configured API key (masked).
auth test
Validate the configured API key against the API.
The API key is read from the LIFI_API_KEY environment variable. See Installation for setup instructions.
Health Check
health
Check API connectivity and latency.
No arguments required.