LI.FI Advanced Routes API
Get LI.FI Advanced Routes data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Lifi, pass parameters such as fromAddress, fromAmount, fromChainId, and retrieve structured data including available route alternatives, route identifier, estimated destination amount, minimum quoted destination amount, and unavailable-route metadata to compare route estimates, and explain missing alternatives.
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- 0Selected implementation · last 30 days
- Success rate · 30d
- —No requests in this period
LI.FI Advanced Routes API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- API
- Pricing
On this page
Overview
LI.FI Advanced Routes API
POST the transfer request object as the JSON body, rather than wrapping it inside a body property. Reference request fields include fromChainId, toChainId, fromTokenAddress, toTokenAddress, fromAmount and options.
Quick Facts
| Fact | Value |
|---|---|
| Access | OpenAny REST |
| Authentication | OpenAny API key in the Authorization header |
| Core inputs | Required JSON body: body |
| Selected implementation | lifi · LI.FI — Get a set of routes for a request that describes a transfer of tokens |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Compare route estimates: Keep route IDs with amount estimates.
- Explain missing alternatives: Read unavailableRoutes when no desired route is returned.
Returned Data
| Field | Meaning |
|---|---|
routes |
Available route alternatives |
routes[].id |
Route identifier |
routes[].fromAmount |
Source amount in base units |
routes[].toAmount |
Estimated destination amount |
routes[].toAmountMin |
Minimum quoted destination amount |
unavailableRoutes |
Unavailable-route metadata |
Quick Start
- Set OPENANY_API_KEY to your OpenAny API key.
- Review the selected implementation and pricing, then adapt the request below to your target.
- Check the HTTP response and business result before reading optional fields.
curl --request POST \
https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw '{"fromAddress":"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0","fromAmount":"100000000","fromChainId":1,"fromTokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","options":{"slippage":0.005},"toChainId":10,"toTokenAddress":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"}'
Request and Response Examples
The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.
Published LI.FI Advanced Routes API implementation contract.
Pricing and Billing
The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.
Frequently Asked Questions
Related APIs
Playground
Run sends a real API request. Charges follow the published API contract.
Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
lifiCurrent LI.FI — Get a set of routes for a request that describes a transfer of tokens · POST · View API reference | $0 / call | 0 | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 4. Price update time: not supplied.
Total $0
API
- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
fromAmount | JSON request bodybody | string | Yes | The amount that should be transferred including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) |
fromChainId | JSON request bodybody | number | Yes | The sending chain id format: number |
fromTokenAddress | JSON request bodybody | string | Yes | The address of the sending `Token` |
toChainId | JSON request bodybody | number | Yes | The id of the receiving chain format: number |
toTokenAddress | JSON request bodybody | string | Yes | The address of the receiving `Token` |
fromAddress | JSON request bodybody | string | No | The sending wallet address |
fromAmountForGas | JSON request bodybody | string | No | The amount of the token to convert to gas on the destination side. |
options | JSON request bodybody | object | No | Optional configuration for the routes Nested fields and variants
|
toAddress | JSON request bodybody | string | No | The receiving wallet address |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
routesobject[]fromAddressstringfromAmountstringfromAmountUSDstringfromChainIdintegerfromTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsstring[]verificationStatusstringverificationStatusBreakdownobject[]providerstringproviderResultstringresultstring
idstringtoAddressstringtoAmountstringtoAmountMinstringtoAmountUSDstringtoChainIdintegertoTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsstring[]verificationStatusstringverificationStatusBreakdownobject[]providerstringproviderResultstringresultstring
unavailableRoutesobjectfailedobject[]overallPathstringsubpathsobject1:USDC-squid-10:USDCobject[]
filteredOutobject[]overallPathstringreasonstring
Agent integration
Copy the resource contract without sharing an API key.
Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Documentation example (source abbreviated)
Published documentation example. Verify the actual response after an approved call.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 1
Review these request fields before running. Keep the published provider and request method unchanged.
body- A description of a token transfer
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromAmount": "100000000", "fromChainId": 1, "fromTokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "options": { "slippage": 0.005 }, "toChainId": 10, "toTokenAddress": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "routes": [ { "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromAmount": "100000000", "fromAmountUSD": "100.0235", "fromChainId": 1, "fromToken": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "name": "USD Coin", "priceUSD": "1.0002350525", "symbol": "USDC", "tags": [ "stablecoin" ], "verificationStatus": "verified", "verificationStatusBreakdown": [ { "provider": "hypernative", "providerResult": "accept", "result": "verified" } ] }, "id": "f7623b70-2446-47a7-a306-2f67fa59301f", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAmount": "99739729", "toAmountMin": "99739729", "toAmountUSD": "99.8232", "toChainId": 10, "toToken": { "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "chainId": 10, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "name": "USD Coin", "priceUSD": "1.0008373187", "symbol": "USDC", "tags": [ "stablecoin" ], "verificationStatus": "verified", "verificationStatusBreakdown": [ { "provider": "hypernative", "providerResult": "accept", "result": "verified" } ] } }, { "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromAmount": "100000000", "fromAmountUSD": "100.0235", "fromChainId": 1, "fromToken": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "name": "USD Coin", "priceUSD": "1.0002350525", "symbol": "USDC", "tags": [ "stablecoin" ], "verificationStatus": "verified", "verificationStatusBreakdown": [ { "provider": "hypernative", "providerResult": "accept", "result": "verified" } ] }, "id": "b64036bd-0985-441e-9019-ac734c8c517a", "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toAmount": "99750000", "toAmountMin": "99750000", "toAmountUSD": "99.8335", "toChainId": 10, "toToken": { "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "chainId": 10, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png", "name": "USD Coin", "priceUSD": "1.0008373187", "symbol": "USDC", "tags": [ "stablecoin" ], "verificationStatus": "verified", "verificationStatusBreakdown": [ { "provider": "hypernative", "providerResult": "accept", "result": "verified" } ] } } ], "unavailableRoutes": { "failed": [ { "overallPath": "1:USDC~1:USDC-1:USDC-squid-10:USDC", "subpaths": { "1:USDC-squid-10:USDC": [ {} ] } } ], "filteredOut": [ { "overallPath": "1:USDC~1:USDC-1:USDC-near-10:USDC", "reason": "The route estimation did not complete before the route timing strategy stopped waiting for results" }, { "overallPath": "1:USDC~1:ETH-1:ETH-across-10:ETH-10:ETH~10:USDC", "reason": "Across does not send ETH to contracts (receiver: ReceiverAcrossV4)" } ] } }