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:

  1. Check native token balances on target chains

  2. Fetch native token USD prices from LI.FI token API

  3. Identify chains below the minimum gas threshold

  4. Fetch bridge quotes from LI.FI (GET /v1/quote)

  5. Sign and broadcast bridge transactions on the source chain

Links:

eth_defi.lifi.api

LI.FI API utilities.

eth_defi.lifi.constants

LI.FI API configuration and constants.

eth_defi.lifi.quote

LI.FI cross-chain quote fetching.

eth_defi.lifi.crosschain

Cross-chain gas feeding using LI.FI.

eth_defi.lifi.top_up

Cross-chain gas top-up orchestration using LI.FI.

eth_defi.lifi.intents

LI.FI Intents API (not yet implemented).