LI.FI — Get a set of routes for a request that describes a transfer of tokens
Retrieve a set of routes for a request that describes a transfer of tokens with the LI.FI API. Supply a from amount and a from chain ID. Sample fields include addresses and symbols. Use it for on-chain or crypto market research. Use the response in a DeFi workflow for the selected protocol, and compare the request and response with the provider example.
- Selected price
- $0 / callPublished pricing
- Sellers / implementations
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
lifiCurrent LI.FI — Get a set of routes for a request that describes a transfer of tokens · POST | $0 / call | — | —successP50— |
Run sends a real API request. Charges follow the published API contract.
Response structure
routesobject[]fromAddressstringfromAmountstringfromAmountUSDstringfromChainIdintegerfromTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsstring[]verificationStatusstringverificationStatusBreakdownobject[]providerstringproviderResultstringresultstring
idstringtoAddressstringtoAmountstringtoAmountMinstringtoAmountUSDstringtoChainIdintegertoTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsstring[]verificationStatusstringverificationStatusBreakdownobject[]providerstringproviderResultstringresultstring
unavailableRoutesobjectfailedobject[]overallPathstringsubpathsobject1:USDC-squid-10:USDCobject[]
filteredOutobject[]overallPathstringreasonstring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
routes?: Array<{
fromAddress?: string;
fromAmount?: string;
fromAmountUSD?: string;
fromChainId?: number;
fromToken?: {
address?: string;
chainId?: number;
coinKey?: string;
decimals?: number;
logoURI?: string;
name?: string;
priceUSD?: string;
symbol?: string;
tags?: Array<string>;
verificationStatus?: string;
verificationStatusBreakdown?: Array<{
provider?: string;
providerResult?: string;
result?: string;
}>;
};
id?: string;
toAddress?: string;
toAmount?: string;
toAmountMin?: string;
toAmountUSD?: string;
toChainId?: number;
toToken?: {
address?: string;
chainId?: number;
coinKey?: string;
decimals?: number;
logoURI?: string;
name?: string;
priceUSD?: string;
symbol?: string;
tags?: Array<string>;
verificationStatus?: string;
verificationStatusBreakdown?: Array<{
provider?: string;
providerResult?: string;
result?: string;
}>;
};
}>;
unavailableRoutes?: {
failed?: Array<{
overallPath?: string;
subpaths?: {
"1:USDC-squid-10:USDC"?: Array<Record<string, unknown>>;
};
}>;
filteredOut?: Array<{
overallPath?: string;
reason?: string;
}>;
};
};- Method
- POST
- Endpoint
https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'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"
}'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
fromAddress | JSON request bodybody | string | No | The sending wallet address |
fromAmount | JSON request bodybody | string | Yes | The amount that should be transferred including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) |
fromAmountForGas | JSON request bodybody | string | No | The amount of the token to convert to gas on the destination side. |
fromChainId | JSON request bodybody | number | Yes | The sending chain id format: number |
fromTokenAddress | JSON request bodybody | string | Yes | The address of the sending `Token` |
options | JSON request bodybody | object | No | Optional configuration for the routesNested fields and variants
|
toAddress | JSON request bodybody | string | No | The receiving wallet address |
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` |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Published documentation example. Verify the actual response after an approved call.
{
"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)"
}
]
}
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# LI.FI — Get a set of routes for a request that describes a transfer of tokens
Retrieve a set of routes for a request that describes a transfer of tokens with the LI.FI API. Supply a from amount and a from chain ID. Sample fields include addresses and symbols. Use it for on-chain or crypto market research. Use the response in a DeFi workflow for the selected protocol, and compare the request and response with the provider example.
## Available implementations
lifi · LI.FI — Get a set of routes for a request that describes a transfer of tokens: https://openany.si/markets/apis/capabilities/lifi-li-fi-get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens?offering=93ccbe08-0515-45a9-89a4-5868215f55db · $0 / call
## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/lifi-li-fi-get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes
Price: $0 / call
Provider: lifi
Contract revision: 3
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'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"
}'
```
## API contract
```json
{
"resource_type": "api",
"name": "LI.FI — Get a set of routes for a request that describes a transfer of tokens",
"endpoint": "https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes",
"method": "POST",
"content_type": "application/json",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "A description of a token transfer",
"json_schema": {
"description": "A description of a token transfer",
"example": {
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "1000000000000000000",
"fromChainId": 100,
"fromTokenAddress": "0x63e62989d9eb2d37dfdb1f93a22f063635b07d51",
"options": {
"bridges": {
"allow": [
"relay"
]
},
"exchanges": {
"allow": [
"1inch",
"openocean"
]
},
"fee": 0.02,
"integrator": "fee-demo",
"slippage": 0.003
},
"toChainId": 137,
"toTokenAddress": "0xc0b2983a17573660053beeed6fdb1053107cf387"
},
"examples": [
{
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "100000000",
"fromChainId": 1,
"fromTokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"options": {
"slippage": 0.005
},
"toChainId": 10,
"toTokenAddress": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
}
],
"properties": {
"fromAddress": {
"description": "The sending wallet address",
"example": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"type": "string"
},
"fromAmount": {
"description": "The amount that should be transferred including all decimals (e.g. 1000000 for 1 USDC (6 decimals))",
"example": "100000000",
"type": "string"
},
"fromAmountForGas": {
"description": "The amount of the token to convert to gas on the destination side.",
"type": "string"
},
"fromChainId": {
"description": "The sending chain id",
"example": 1,
"format": "number",
"type": "number"
},
"fromTokenAddress": {
"description": "The address of the sending `Token`",
"example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"type": "string"
},
"options": {
"description": "Optional configuration for the routes",
"example": {
"slippage": 0.005
},
"properties": {
"allowDestinationCall": {
"default": true,
"description": "Defines if we should return routes with a cross-chain bridge protocol (Connext, etc.) destination calls or not.",
"type": "boolean"
},
"allowSwitchChain": {
"default": false,
"description": "Whether chain switches should be allowed in the routes",
"type": "boolean"
},
"bridges": {
"description": "Object configuring the bridges that should or should not be taken into consideration for the possibilities",
"properties": {
"allow": {
"default": [
"all"
],
"items": {
"type": "string"
},
"type": "array"
},
"deny": {
"items": {
"type": "string"
},
"type": "array"
},
"prefer": {
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "Root Type for AllowDenyPrefer",
"type": "object"
},
"distributionFees": {
"description": "Optional array of partner-specified fee distributions. Each entry transfers its `percentage` of the source `fromAmount` to the `receiver` address in parallel with the integrator fee and any intermediary carve-out. Same validation and chain-support rules as the /quote `distributionFees` query parameter. On EVM and Tron this requires FeeForwarder; on Solana each receiver is a transfer instruction and at most 2 entries are accepted. The `receiver` form must match the source chain. Limits: 1..10 entries, each `percentage` in (0, 0.5); total of all distribution percentages plus the integrator `fee` must be strictly less than 1. Receivers are sanctions-screened at transaction-build time. On Solana swap-and-bridge routes the percentages apply to the swap output in the intermediate token.",
"items": {
"description": "Partner-specified fee distribution entry. The `percentage` of the original `fromAmount` is transferred to `receiver` in parallel with the integrator fee and any intermediary carve-out — via the FeeForwarder contract on EVM/Tron, as a dedicated transfer instruction on Solana. On Solana swap-and-bridge routes, the percentage applies to the swap output in the intermediate token instead of fromAmount.",
"properties": {
"percentage": {
"description": "Fraction of the source token's `fromAmount` to transfer to the receiver (on Solana swap-and-bridge routes, use the swap output in the intermediate token instead). Must be greater than 0 and strictly less than 0.5 per entry; the total of all distributionFees percentages plus the integrator `fee` must remain strictly less than 1.",
"exclusiveMaximum": 0.5,
"exclusiveMinimum": 0,
"format": "double",
"type": "number"
},
"receiver": {
"description": "Recipient address in the form of the source chain: 20-byte 0x-prefixed hex on EVM/Tron (all-lowercase or a valid EIP-55 checksum), base58 public key on Solana. A receiver whose form does not match the source chain is rejected.",
"pattern": "^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$",
"type": "string"
}
},
"required": [
"percentage",
"receiver"
],
"title": "Root Type for DistributionFeeEntry",
"type": "object"
},
"maxItems": 10,
"minItems": 1,
"type": "array"
},
"exchanges": {
"description": "Object configuring the exchanges that should or should not be taken into consideration for the possibilities",
"properties": {
"allow": {
"default": [
"all"
],
"items": {
"type": "string"
},
"type": "array"
},
"deny": {
"items": {
"type": "string"
},
"type": "array"
},
"prefer": {
"items": {
"type": "string"
},
"type": "array"
}
},
"title": "Root Type for AllowDenyPrefer",
"type": "object"
},
"fee": {
"description": "The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%.",
"exclusiveMaximum": 1,
"format": "double",
"minimum": 0,
"type": "number"
},
"insurance": {
"deprecated": true,
"description": "Facilitates transfer insurance via insurace.io, ensuring secure and insured transfer of assets.",
"type": "boolean"
},
"integrator": {
"description": "Custom string the developer who integrates LiFi can set",
"type": "string"
},
"maxPriceImpact": {
"description": "The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.",
"format": "double",
"type": "number"
},
"order": {
"description": "The way the resulting routes should be ordered",
"enum": [
"FASTEST",
"CHEAPEST"
],
"type": "string"
},
"pools": {
"description": "AMM pools or Solana venues that should not be considered for routing. Nested under `options.pools.deny` on POST `/v1/advanced/routes`. Only some exchanges can exclude pools: EVM pool entries restrict swaps on every chain except Solana to the `fly` exchange, and Solana program IDs restrict swaps on Solana to `jupiter`, `titan` and `okx`. Swaps on a chain with no matching entries are not restricted. The list is not carried in the returned steps: pass it again as the `denyPools` query parameter on every POST `/v1/advanced/stepTransaction` request.",
"properties": {
"deny": {
"description": "One to 100 AMM pool or Solana venue identifiers to exclude. Each entry is a non-zero Uniswap V2/V3 pool address (`0x` + 40 hex), a Uniswap V4 composite `<poolManagerAddress>-<poolId>` where `poolId` is a 32-byte hex string (`0x` + 64 hex), or a Solana venue program ID (base58), which excludes every pool of that venue. Identifiers of other chains are rejected; individual Solana pool addresses are not supported.",
"items": {
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"type": [
"array",
"null"
]
}
},
"type": "object"
},
"preset": {
"description": "Pre-configured routing and quote optimization preset. The preset value `stablecoin` is supported for requesting swap and/or bridging operations involving stablecoin tokens. Each preset provides optimized default settings for slippage, price impact, and tool preferences that can be overridden by custom configuration options specified in the same request.",
"example": "stablecoin",
"maxLength": 50,
"minLength": 1,
"pattern": "^[a-zA-Z0-9-_]+$",
"type": "string"
},
"referrer": {
"description": "Integrators can set a wallet address as referrer to track them",
"type": "string"
},
"slippage": {
"description": "The maximum allowed slippage",
"format": "double",
"type": "number"
},
"svmMaxSupportedTransactionVersion": {
"default": 0,
"description": "Maximum Solana transaction version the client can sign. Defaults to 0; omission or null uses v0. Set to 1 to allow V1 where enabled. Jito requests always use v0. At execution, pass the maximum to /advanced/stepTransaction and inspect transactionRequest.svmTransactionVersion.",
"enum": [
0,
1
],
"type": [
"number",
"null"
]
},
"svmPriorityFeeLevel": {
"description": "Priority fee level for Solana Virtual Machine (SVM) transactions.",
"enum": [
"NORMAL",
"FAST",
"ULTRA"
],
"type": "string"
},
"timing": {
"properties": {
"routeTimingStrategies": {
"description": "Timing setting to wait for a certain amount of routes to be generated before choosing the best one. Please check [docs.li.fi](https://docs.li.fi) for more details.",
"items": {
"properties": {
"minWaitTimeMs": {
"maximum": 15000,
"minimum": 0,
"type": "number"
},
"reduceEveryMs": {
"maximum": 15000,
"minimum": 0,
"type": "number"
},
"startingExpectedResults": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"strategy": {
"enum": [
"minWaitTime"
]
}
},
"type": "object"
},
"type": "array"
},
"swapStepTimingStrategies": {
"description": "Timing setting to wait for a certain amount of swap rates. Please check [docs.li.fi](https://docs.li.fi) for more details.",
"items": {
"properties": {
"minWaitTimeMs": {
"maximum": 15000,
"minimum": 0,
"type": "number"
},
"reduceEveryMs": {
"maximum": 15000,
"minimum": 0,
"type": "number"
},
"startingExpectedResults": {
"maximum": 100,
"minimum": 0,
"type": "number"
},
"strategy": {
"enum": [
"minWaitTime"
]
}
},
"type": "object"
},
"type": "array"
}
},
"type": "object"
}
},
"title": "Root Type for RouteOptions",
"type": "object"
},
"toAddress": {
"description": "The receiving wallet address",
"type": "string"
},
"toChainId": {
"description": "The id of the receiving chain",
"example": 10,
"format": "number",
"type": "number"
},
"toTokenAddress": {
"description": "The address of the receiving `Token`",
"example": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"type": "string"
}
},
"required": [
"fromAmount",
"fromChainId",
"fromTokenAddress",
"toChainId",
"toTokenAddress"
],
"title": "Root Type for RoutesRequest",
"type": "object"
},
"location": "body",
"name": "body",
"nullable": false,
"pointer": "",
"required": true,
"type": "object"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example (source abbreviated)",
"request": {
"body": {
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "100000000",
"fromChainId": 1,
"fromTokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"options": {
"slippage": 0.005
},
"toChainId": 10,
"toTokenAddress": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
},
"headers": {},
"path": {},
"query": {}
},
"response_body": {
"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)"
}
]
}
}
}
]
}
```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. |
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)" } ] } }
Common questions
Do I need a separate key for every provider?
Use your OpenAny API key for standard API access. Read it from OPENANY_API_KEY in your environment and keep it out of prompts, source code and logs.
Are these providers interchangeable?
No. Each offering has its own inputs, pricing and response contract. Selecting a catalog offering does not establish automatic routing or fallback. Confirm the service contract before calling.
How is this API billed?
API-key calls use your shared balance at the selected implementation's published rate. Check the billing unit and request-specific pricing rules before making a paid call. Recorded usage determines the final charge under that contract.
Where do the price and contract come from?
The selected implementation publishes its provider, request contract, revision and billing rules through OpenAny's public API catalog. A revision number identifies a contract version, not a price update date. A price update timestamp is not supplied; do not treat a page date as one.
How do OpenAny Balance and x402 differ?
OpenAny Balance uses an API key and one shared balance. Card, USDC and x402 top-ups, card auto top-up and USDC subscriptions fund that balance; available routes appear on the Credits page. Direct x402 is a separate pay-per-request flow, available only on listings that show it and requiring an authorized payment client.
Does Playground send a paid request?
Yes. After you sign in, Run sends a real API request using an active OpenAny API key. Charges follow the published API contract and use your shared balance. Selecting an implementation, editing inputs and viewing sample responses do not send requests.
Use LI.FI — Get a set of routes for a request that describes a transfer of tokens with your agent
Inspect endpoint contracts and confirm availability and pricing before a paid call.