lifi
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.
Best use case
lifi is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
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.
Teams using lifi should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/lifi-skill/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How lifi Compares
| Feature / Agent | lifi | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
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.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# LI.FI Agent Skill
## Purpose
Use the LI.FI API to fetch cross-chain and same-chain swap/bridge data, then use `transactionRequest` returned by the API to build a transaction request that can be submitted by a wallet.
## Usage
- NEVER use web_search when searching for quotes or routes. ALWAYS USE LIFI SKILL.
Use Endpoint Specifications to build transaction requests.
- NEVER use external price sources (Coinbase, etc.) to estimate quotes.
- ALWAYS use curl to make API calls.
- ALWAYS refer to (## How to use the LIFI API)[#how-to-use-the-lifi-api] to understand what api call to do.
- ALWAYS tell the user that the quote is provided by LI.FI and not by the agent or external web search.
- if not specified, default slippage is 1% and deadline is 10 minutes.
## Base URL and Auth
- Base URL: `https://li.quest`
- Auth: `x-lifi-api-key` header using `LIFI_API_KEY` when available; otherwise public access may be rate-limited.
## How to use the LIFI API
### Get information about all currently supported chains.
**Action**: GET /chains
Request example:
```bash
curl --request GET \
--url https://li.quest/v1/chains \
--header 'x-lifi-api-key: LIFI_API_KEY'
```
### Retrieve tokens available on specified chains.
**Action**: GET /tokens
**Description**: This endpoint can be used to fetch all tokens known to the LI.FI services..
Request example:
```bash
curl --request GET \
--url 'https://li.quest/v1/tokens?chains=1' \
--header 'x-lifi-api-key: LIFI_API_KEY'
```
### Get a transfer quote with ready-to-execute transaction data.
**Action**: GET /quote
**Description**: This endpoint can be used to request a quote for a transfer of one token to another, cross chain or not.
The endpoint returns a Step object which contains information about the estimated result as well as a transactionRequest which can directly be sent to your wallet.
The estimated result can be found inside the estimate, containing the estimated toAmount of the requested Token and the toAmountMin, which is the guaranteed minimum value that the transfer will yield including slippage.
Request example:
```bash
curl --request GET \
--url 'https://li.quest/v1/quote?fromChain=1&toChain=42161&fromToken=ETH&toToken=USD&fromAddress=0x123..&toAddress=0x456..&fromAmount=1000000&slippage=0.005' \
--header 'x-lifi-api-key: LIFI_API_KEY'
```
### Perform multiple contract calls across blockchains (BETA)
**Action**: POST /quote/contractCalls
**Description**: This endpoint can be used to bridge tokens, swap them and perform a number or arbitrary contract calls on the destination chain. You can find an example of it here.
This functionality is currently in beta. While we've worked hard to ensure its stability and functionality, there might still be some rough edges.
Request example:
```bash
curl --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": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toChain": 1,
"toToken": "ETH",
"toAmount": "100000000000001",
"contractCalls": [
{
"fromAmount": "100000000000001",
"fromTokenAddress": "0x0000000000000000000000000000000000000000",
"toTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toContractAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toContractCallData": "0x",
"toContractGasLimit": "110000"
},
{
"fromAmount": "100000000000000",
"fromTokenAddress": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
"toTokenAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"toContractAddress": "0x7f39c581f595b53c5cb19bd0b3f8da6c935e2ca0",
"toFallbackAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toContractCallData": "0xea598cb000000000000000000000000000000000000000000000000000005af3107a4000",
"toContractGasLimit": "100000"
}
],
"integrator": "muc-hackaton-postman"
}
'}'
```
### Check the status of a cross-chain transfer.
**Action**: GET /status
**Description**: Cross chain transfers might take a while to complete. Waiting on the transaction on the sending chain doesn't help here. For this reason we build a simple endpoint that let's you check the status of your transfer.
Important: The endpoint returns a 200 successful response even if the transaction can not be found. This behavior accounts for the case that the transaction hash is valid but the transaction has not been mined yet.
While non of the parameters fromChain, toChain and bridge are required, passing the fromChain parameter will speed up the request and is therefore encouraged.
Request example:
```bash
curl --request GET \
--url 'https://li.quest/v1/status?txHash=0x123..' \
--header 'x-lifi-api-key: LIFI_API_KEY'
```
### Get a set of routes for a request that describes a transfer of tokens
**Action**: POST /advanced/routes
**Description**: In order to execute any transfer, you must first request possible Routes. From the result set a Route can be selected and executed by retrieving the transaction for every included Step using the /steps/transaction endpoint.
Request example:
```bash
curl --request POST \
--url https://li.quest/v1/advanced/routes \
--header 'Content-Type: application/json' \
--header 'x-lifi-api-key: LIFI_API_KEY' \
--data '
{
"fromChainId": 100,
"fromAmount": "1000000000000000000",
"fromTokenAddress": "0x0000000000000000000000000000000000000000",
"toChainId": 137,
"toTokenAddress": "0x0000000000000000000000000000000000000000",
"options": {
"integrator": "fee-demo",
"referrer": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"slippage": 0.003,
"fee": 0.02,
"bridges": {
"allow": [
"relay"
]
},
"exchanges": {
"allow": [
"1inch",
"openocean"
]
},
"allowSwitchChain": true,
"order": "CHEAPEST",
"maxPriceImpact": 0.1
}
}
'
```
### Get available bridges and exchanges
**Action**: GET /tools
**Description**: This endpoint can be used to get information about the bridges and exchanges available trough LI.FI.
Request example:
```bash
curl --request GET \
--url 'https://li.quest/v1/tools?chains=1&chains=2&chains=3' \
--header 'x-lifi-api-key: LIFI_API_KEY'
```
## Documentation
llm documentation: https://docs.li.fi/llms.txt
openapi spec: https://gist.githubusercontent.com/kenny-io/7fede47200a757195000bfbe14c5baee/raw/725cf9d4a6920d5b930925b0412d766aa53c701c/lifi-openapi.yamlRelated Skills
simplified-social-media
Manage your entire social media presence — post, schedule, and analyze — directly from your AI coding tool.
paylock
Non-custodial SOL escrow for AI agent deals.
agent-reputation
summary: Cross-platform AI agent reputation checker with trust scoring and PayLock escrow recommendations.
Telecom Agent Skill
Turn your AI Agent into a Telecom Operator. Bulk calling, ChatOps, and Field Monitoring.
OpenClaw-Finnhub
OpenClaw skill for real-time stock quote, and financials via Finnhub API.
```markdown
# OpenClaw-Last.fm
security-operator
Runtime security guardrails for OpenClaw agents.
operator-humanizer
Transform AI-generated text into authentic human writing.
kit-email-operator
**AI-powered email marketing for Kit (ConvertKit)**.
agora
Trade prediction markets on Agora — the prediction market exclusively for AI agents. Register, browse markets, trade YES/NO, create markets, earn reputation via Brier scores.
surf-check
Surf forecast decision engine.
jinko-flight-search
Search flights and discover travel destinations using the Jinko MCP server. Provides two core capabilities: (1) Destination discovery — find where to travel based on criteria like budget, climate, or activities when the user has no specific destination in mind, and (2) Specific flight search — compare flights between two known cities/airports with flexible dates, cabin classes, and budget filters. Use this skill when the user wants to: search for flights, find cheap flights, discover travel destinations, compare flight prices, plan a trip, find deals from a specific city, or explore where to go. Triggers on any flight-booking, travel-planning, or destination-discovery request. Requires the Jinko MCP server connected at https://mcp.gojinko.com.