portal.trading.lifi API. This guide covers getting quotes, finding routes, executing swaps and bridges, and tracking transaction status.
Overview
The Li.Fi functionality allows you to:- Get quotes for bridging or swapping tokens across chains
- Find routes to discover the best paths for your cross-chain transfers
- Execute swaps and bridges by signing and submitting transactions
- Track transaction status for cross-chain transfers
Prerequisites
Before using Li.Fi operations, ensure you have:- A properly initialized Portal client
- An active wallet with the required token(s) on the source network (see Create a wallet)
- Li.Fi integration enabled in your Portal Dashboard (see Li.Fi Integration)
Getting a Quote
Finding Routes
Getting Route Step Details
Executing Transactions
Note
LifiTransactionRequestmay includegasLimitandgasPrice. You can omit these fields to let Portal estimate gas automatically, or include them if you prefer to use Li.Fi’s suggested values.
Processing Multi-Step Routes
Tracking Transaction Status
Polling Until Completion
Supported Networks
Li.Fi supports a wide range of networks for bridging and swapping. Common networks include:- Monad (
eip155:143) - Ethereum (
eip155:1) - Polygon (
eip155:137) - Base (
eip155:8453) - Arbitrum (
eip155:42161) - Optimism (
eip155:10) - Avalanche (
eip155:43114) - And many more…
Next Steps
- Learn about signing Ethereum transactions
- Explore sending tokens
- Check out the Client API Li.Fi endpoints