LI.FI API
Introduction
LI.FI is a cross-chain bridge and DEX aggregator that enables token transfers and swaps across multiple EVM chains. It aggregates liquidity from various bridges and DEXes to find optimal routes for cross-chain transfers.
eth_defi provides LI.FI integration for cross-chain gas feeding — automatically
topping up native gas token balances on multiple chains from a single source chain.
For a complete working example, see the Cross-chain gas feeding with LI.FI tutorial.
Use cases:
Cross-chain gas feeding: Monitor gas balances across chains and bridge native tokens when any chain runs low
Multi-chain hot wallet management: Keep hot wallets funded across all operational chains
Automated bridging: Programmatic cross-chain native token transfers
Bridge flow:
Check native token balances on target chains
Fetch native token USD prices from LI.FI token API
Identify chains below the minimum gas threshold
Fetch bridge quotes from LI.FI (GET /v1/quote)
Sign and broadcast bridge transactions on the source chain
Links:
LI.FI partner portal (for API keys)
LI.FI API utilities. |
|
LI.FI API configuration and constants. |
|
LI.FI cross-chain quote fetching. |
|
Cross-chain gas feeding using LI.FI. |
|
Cross-chain gas top-up orchestration using LI.FI. |
|
LI.FI Intents API (not yet implemented). |