lifi-skillv4 - Use LI.FI API for cross-chain and same-chain swaps, bridges, and contract calls. Use when quoting routes, validating chains/tokens, building transaction requests, and tracking status.
Install via ClawdBot CLI:
clawdbot install fabriziogianni7/lifi-skillcurl to call the LI.FI API. NEVER use web_search, web_fetch, or any other tool.https://li.quest/v1/. No other base URL."x-lifi-api-key: $LIFI_API_KEY" (double quotes, dollar sign — shell expands it).defi_get_strategy), use that instead. The agent can also adjust dynamically per-transaction if the user requests it.&skipSimulation=true to all /v1/quote requests. Our EIP-7702 delegated wallets have on-chain code that breaks LI.FI's simulation.defi_approve or defi_approve_and_send tools.After every transaction broadcast, always provide a clickable block explorer link:
View tx — use the correct explorer (etherscan.io, basescan.org, arbiscan.io, polygonscan.com, optimistic.etherscan.io)View tx9270000000000000. Use this for fromChain and toChain in LI.FI quote requests when the user wants Sui (e.g. fromChain=9270000000000000&toChain=9270000000000000 for same-chain Sui swap).defi_get_wallet as fromAddress.defi_send_sui_transaction — pass the transaction bytes (hex) from the LI.FI quote. Do not use defi_send_transaction or defi_approve_and_send for Sui.curl -s --request GET \
--url https://li.quest/v1/chains \
--header "x-lifi-api-key: $LIFI_API_KEY"
Use for: listing chains, testing connectivity. If user asks for a test, use this.
curl -s --request GET \
--url 'https://li.quest/v1/tokens?chains=8453' \
--header "x-lifi-api-key: $LIFI_API_KEY"
Params: chains (comma-separated chain IDs).
curl -s --request GET \
--url 'https://li.quest/v1/quote?fromChain=8453&toChain=8453&fromToken=ETH&toToken=USDC&fromAddress=0xYOUR_ADDRESS&fromAmount=100000000000000&slippage=0.10&skipSimulation=true' \
--header "x-lifi-api-key: $LIFI_API_KEY"
Params: fromChain, toChain, fromToken, toToken, fromAddress, toAddress (optional), fromAmount (in wei), slippage (decimal, e.g. 0.10 = 10%), skipSimulation=true (ALWAYS include).
Returns: estimate (with toAmount, toAmountMin, approvalAddress) and transactionRequest (ready for wallet submission).
After presenting a quote to the user, always include the estimated output amount, fees, and slippage. Get the user's wallet address with defi_get_wallet and use it as fromAddress in the quote.
Check if ERC-20 approval is needed: If the quote's transactionRequest.value is "0x0" AND estimate.approvalAddress exists, the swap/bridge is using an ERC-20 token that needs approval first.
defi_approve_and_send with:token: the action.fromToken.address from the quotespender: the estimate.approvalAddress from the quoteapproveAmount: the action.fromAmount from the quote (or omit for unlimited)to, value, data, gasLimit: from the quote's transactionRequestdefi_send_transaction with the quote's transactionRequest fields: to, value, data, chainId, and gasLimit (ALWAYS pass gasLimit from the quote).NEVER construct approve calldata hex yourself. The defi_approve and defi_approve_and_send tools handle ABI encoding correctly.
Sui: For quotes where fromChain or toChain is Sui, use defi_send_sui_transaction with the quote's transaction bytes. No approval step.
curl -s --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'Content-Type: application/json' \
--header "x-lifi-api-key: $LIFI_API_KEY" \
--data '{
"fromChainId": 8453,
"fromAmount": "100000000000000",
"fromTokenAddress": "0x0000000000000000000000000000000000000000",
"toChainId": 8453,
"toTokenAddress": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"options": {
"slippage": 0.10,
"order": "RECOMMENDED"
}
}'
curl -s --request POST \
--url https://li.quest/v1/quote/contractCalls \
--header 'Content-Type: application/json' \
--header "x-lifi-api-key: $LIFI_API_KEY" \
--data '{
"fromChain": 10,
"fromToken": "0x4200000000000000000000000000000000000042",
"fromAddress": "0xYOUR_ADDRESS",
"toChain": 1,
"toToken": "ETH",
"toAmount": "100000000000001",
"contractCalls": []
}'
curl -s --request GET \
--url 'https://li.quest/v1/status?txHash=0xYOUR_TX_HASH&fromChain=8453' \
--header "x-lifi-api-key: $LIFI_API_KEY"
Pass fromChain to speed up the lookup.
curl -s --request GET \
--url 'https://li.quest/v1/tools?chains=8453' \
--header "x-lifi-api-key: $LIFI_API_KEY"
Generated Mar 1, 2026
A user wants to move USDC from Ethereum to Arbitrum to participate in a new liquidity pool with higher APY. Using the LI.FI skill, the agent fetches a bridge quote, checks for approval needs, and executes the transaction, providing a block explorer link for tracking. This enables seamless cross-chain DeFi participation without manual bridge interactions.
An investor holds ETH on Base and wants to diversify into SOL on Solana. The agent uses the LI.FI skill to get a bridge quote from Base to Solana, converts ETH to SOL via a cross-chain swap, and executes it with proper slippage settings. This automates complex multi-chain asset management for portfolio optimization.
A gamer on the Sui blockchain needs to swap SUI tokens for a gaming-specific token to purchase in-game items. The agent uses the Sui chain ID in LI.FI quotes, retrieves the user's suiAddress, and executes the swap via defi_send_sui_transaction, providing a Sui block explorer link. This facilitates fast, same-chain swaps for blockchain gaming economies.
A DAO wants to execute a multi-step DeFi strategy, such as swapping ETH for USDC on Optimism and then bridging it to Ethereum for treasury diversification. The agent uses the contractCalls endpoint to bundle these steps into a single quote, ensuring efficient execution with minimal gas costs and compliance with the skill's critical rules.
A new user deposits ETH on Base via a centralized exchange and wants to swap it for USDC to start using DeFi apps. The agent fetches a same-chain quote using the LI.FI skill, checks for native token approval (not needed for ETH), and executes the swap with default slippage, providing an educational breakdown of fees and output amounts.
Businesses integrate LI.FI's API to offer cross-chain swap and bridge services within their platforms, charging a markup on transaction fees or subscription fees. This model leverages the skill's endpoints for quoting and execution, enabling seamless multi-chain functionality without building infrastructure from scratch.
Financial institutions or wallet providers white-label the LI.FI skill to offer branded cross-chain DeFi services. They use the skill to fetch quotes and execute transactions, generating revenue through embedded commissions or premium features like advanced route optimization for high-volume traders.
Companies build tools on top of the LI.FI skill, such as analytics dashboards for tracking cross-chain transaction status or SDKs for easier integration. Revenue comes from licensing these tools to other developers or enterprises, leveraging the skill's endpoints for data fetching and transaction monitoring.
💬 Integration Tip
Always set skipSimulation=true in quote requests to avoid issues with EIP-7702 wallets, and use defi_approve_and_send for ERC-20 approvals to ensure correct ABI encoding.
Analyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
Get stock prices, quotes, fundamentals, earnings, options, dividends, and analyst ratings using Yahoo Finance. Uses yfinance library - no API key required.
Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...
Become an autonomous prediction market trader on Polymarket with AI-powered analysis and a performance-backed token on Base. Trade real markets, build a track record, and let the buyback flywheel run.
Get cryptocurrency token price and generate candlestick charts via CoinGecko API or Hyperliquid API. Use when user asks for token price, crypto price, price chart, or cryptocurrency market data.
Query Polymarket prediction markets - check odds, trending markets, search events, track prices and momentum. Includes watchlist alerts, resolution calendar,...