LI.FI — Get a quote for a token transfer
Retrieve a quote for a token transfer with the LI.FI API. Supply a from chain and a to chain. Sample fields include addresses and symbols. Use it for on-chain or crypto market research. The GET request schema also lists fromChain, toChain, fromToken. 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 quote for a token transfer · GET | $0 / call | — | —successP50— |
Run sends a real API request. Charges follow the published API contract.
Response structure
actionobjectfromAddressstringfromAmountstringfromChainIdintegerfromTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsunknown[]verificationStatusstringverificationStatusBreakdownunknown[]
slippagenumbertoAddressstringtoChainIdintegertoTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsunknown[]verificationStatusstringverificationStatusBreakdownunknown[]
estimateobjectapprovalAddressstringexecutionDurationintegerfeeCostsobject[]fromAmountstringfromAmountUSDstringgasCostsobject[]toAmountstringtoAmountMinstringtoAmountUSDstringtoolstring
idstringincludedStepsobject[]actionobjectestimateobjectidstringtoolstringtoolDetailsobjecttypestring
integratorstringrecommendedSlippagenumberstepSimulationobjectgasSourcestringstatusstring
toolstringtoolDetailsobjectkeystringlogoURIstringnamestring
transactionIdstringtransactionRequestobjectchainIdintegerdatastringfromstringgasLimitstringgasPricestringtostringvaluestring
typestring
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
action?: {
fromAddress?: string;
fromAmount?: string;
fromChainId?: number;
fromToken?: {
address?: string;
chainId?: number;
coinKey?: string;
decimals?: number;
logoURI?: string;
name?: string;
priceUSD?: string;
symbol?: string;
tags?: Array<unknown>;
verificationStatus?: string;
verificationStatusBreakdown?: Array<unknown>;
};
slippage?: number;
toAddress?: string;
toChainId?: number;
toToken?: {
address?: string;
chainId?: number;
coinKey?: string;
decimals?: number;
logoURI?: string;
name?: string;
priceUSD?: string;
symbol?: string;
tags?: Array<unknown>;
verificationStatus?: string;
verificationStatusBreakdown?: Array<unknown>;
};
};
estimate?: {
approvalAddress?: string;
executionDuration?: number;
feeCosts?: Array<Record<string, unknown>>;
fromAmount?: string;
fromAmountUSD?: string;
gasCosts?: Array<Record<string, unknown>>;
toAmount?: string;
toAmountMin?: string;
toAmountUSD?: string;
tool?: string;
};
id?: string;
includedSteps?: Array<{
action?: Record<string, unknown>;
estimate?: Record<string, unknown>;
id?: string;
tool?: string;
toolDetails?: Record<string, unknown>;
type?: string;
}>;
integrator?: string;
recommendedSlippage?: number;
stepSimulation?: {
gasSource?: string;
status?: string;
};
tool?: string;
toolDetails?: {
key?: string;
logoURI?: string;
name?: string;
};
transactionId?: string;
transactionRequest?: {
chainId?: number;
data?: string;
from?: string;
gasLimit?: string;
gasPrice?: string;
to?: string;
value?: string;
};
type?: string;
};- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/lifi/v1/quote- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/lifi/v1/quote?fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&fromAmount=100000000&fromChain=1&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&toChain=10&toToken=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
fromChain | URL query parametersquery | string | Yes | The sending chain. Can be the chain id or chain key |
toChain | URL query parametersquery | string | Yes | The receiving chain. Can be the chain id or chain key |
fromToken | URL query parametersquery | string | Yes | The token that should be transferred. Can be the address or the symbol |
toToken | URL query parametersquery | string | Yes | The token that should be transferred to. Can be the address or the symbol |
fromAddress | URL query parametersquery | string | Yes | The sending wallet address |
toAddress | URL query parametersquery | string | No | The receiving wallet address. If none is provided, the fromAddress will be used |
fromAmount | URL query parametersquery | string | Yes | The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals)) |
order | URL query parametersquery | string | No | Which kind of route should be preferred **FASTEST**: This sorting criterion prioritizes routes with the shortest estimated execution time. Users who value speed and want their transactions to be completed as quickly as possible should choose the fastest routes. **CHEAPEST**: This criterion focuses on minimizing the cost of the transaction, whether in token amount or USD amount (USD amount minus gas cost). Users looking for the most economical option should choose the cheapest routes. enum: "FASTEST", "CHEAPEST" |
slippage | URL query parametersquery | number | No | The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. minimum: 0 · maximum: 1 |
integrator | URL query parametersquery | string | No | A string containing tracking information about the integrator of the API |
fee | URL query parametersquery | number | No | The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount should be less than 100%. minimum: 0 · maximum: 1 |
referrer | URL query parametersquery | string | No | A string containing tracking information about the referrer of the integrator |
allowBridges | URL query parametersquery | array | No | List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
allowExchanges | URL query parametersquery | array | No | List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
denyBridges | URL query parametersquery | array | No | List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
denyExchanges | URL query parametersquery | array | No | List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
denyPools | URL query parametersquery | array | No | One to 100 AMM pool or Solana venue identifiers to exclude from routing. Repeat the query parameter for multiple entries. Each entry is a non-zero Uniswap V2/V3 pool address (`0x` + 40 hex), a Uniswap V4 composite `-` 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. 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.Nested fields and variants
|
preferBridges | URL query parametersquery | array | No | List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
preferExchanges | URL query parametersquery | array | No | List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.Nested fields and variants
|
allowDestinationCall | URL query parametersquery | boolean | No | Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is `true`. |
fromAmountForGas | URL query parametersquery | string | No | The amount of the token to convert to gas on the destination side. |
maxPriceImpact | URL query parametersquery | number | No | 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%. |
swapStepTimingStrategies | URL query parametersquery | array | No | Timing setting to wait for a certain amount of swap rates. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.Nested fields and variants
|
routeTimingStrategies | URL query parametersquery | array | No | Timing setting to wait for a certain amount of routes to be generated before chosing the best one. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.Nested fields and variants
|
skipSimulation | URL query parametersquery | boolean | No | Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate. |
preset | URL query parametersquery | string | No | Pre-configured routing 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 parameters set in the request. minLength: 1 · maxLength: 50 |
svmMaxSupportedTransactionVersion | URL query parametersquery | number | null | No | Maximum Solana transaction version the client can sign. Defaults to 0; omission or null uses v0. Set to 1 to allow V1 where enabled for the environment. Jito requests always use v0. Size overflow may fall back to v0. Read transactionRequest.svmTransactionVersion for the version actually built. Ignored for source chains other than Solana. enum: 0, 1, null |
svmPriorityFeeLevel | URL query parametersquery | string | No | Priority fee level for Solana Virtual Machine (SVM) transactions. enum: "NORMAL", "FAST", "ULTRA" |
slippageScope | URL query parametersquery | string | No | Scope of `slippage`. `step` (default, same as omitted): `slippage` applies to every step and `toAmountMin` combines the steps' minimums. `route`: `slippage` is the budget for the whole route, `toAmountMin` is one floor, `ceil(expected output × (1 − slippage))`, that the returned transaction enforces, and the response carries a `routeSlippage` commitment. Supported for EVM routes with at most one swap: a swap on one chain, or a bridge that delivers to the recipient with or without one swap before it. Other routes are refused with `ROUTE_SLIPPAGE_UNSUPPORTED` instead of falling back to step scope. When `slippage` is omitted, the budget is the default slippage. See [Route-wide Slippage](/guides/route-wide-slippage). enum: "step", "route" |
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.
{
"action": {
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "100000000",
"fromChainId": 1,
"fromToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"coinKey": "USDC",
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
"name": "USD Coin",
"priceUSD": "1.0002350525",
"symbol": "USDC",
"tags": [],
"verificationStatus": "verified",
"verificationStatusBreakdown": []
},
"slippage": 0.010701365645379253,
"toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toChainId": 10,
"toToken": {
"address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"chainId": 10,
"coinKey": "USDC",
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
"name": "USD Coin",
"priceUSD": "1.0008373187",
"symbol": "USDC",
"tags": [],
"verificationStatus": "verified",
"verificationStatusBreakdown": []
}
},
"estimate": {
"approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"executionDuration": 2,
"feeCosts": [
{}
],
"fromAmount": "100000000",
"fromAmountUSD": "100.0235",
"gasCosts": [
{}
],
"toAmount": "99739729",
"toAmountMin": "99739729",
"toAmountUSD": "99.8232",
"tool": "across"
},
"id": "1823bb48-1821-45b1-8e7c-8f97d5698844:0",
"includedSteps": [
{
"action": {},
"estimate": {},
"id": "3d3175b2-2e23-46bb-a62e-47f41b7c3e41",
"tool": "feeCollection",
"toolDetails": {},
"type": "protocol"
}
],
"integrator": "lifi-api",
"recommendedSlippage": 0.01099856322858362,
"stepSimulation": {
"gasSource": "simulation",
"status": "success"
},
"tool": "across",
"toolDetails": {
"key": "across",
"logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg",
"name": "AcrossV4"
},
"transactionId": "0x51d045f404866b9fc560f7806db5eecc183f0ad68409d563608198466803b33c",
"transactionRequest": {
"chainId": 1,
"data": "0x1794958f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000",
"from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"gasLimit": "0x425d3",
"gasPrice": "0x2d4a467",
"to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"value": "0x0"
},
"type": "lifi"
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# LI.FI — Get a quote for a token transfer
Retrieve a quote for a token transfer with the LI.FI API. Supply a from chain and a to chain. Sample fields include addresses and symbols. Use it for on-chain or crypto market research. The GET request schema also lists fromChain, toChain, fromToken. 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 quote for a token transfer: https://openany.si/markets/apis/capabilities/lifi-li-fi-get-a-quote-for-a-token-transfer?offering=d7d964af-a64f-4d47-8126-fc75f2b34561 · $0 / call
## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/lifi-li-fi-get-a-quote-for-a-token-transfer
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/lifi/v1/quote
Price: $0 / call
Provider: lifi
Contract revision: 4
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/quote?fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&fromAmount=100000000&fromChain=1&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&toChain=10&toToken=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "LI.FI — Get a quote for a token transfer",
"endpoint": "https://api.openany.si/v1/agent-apis/lifi/v1/quote",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "The sending chain. Can be the chain id or chain key",
"location": "query",
"name": "fromChain",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The receiving chain. Can be the chain id or chain key",
"location": "query",
"name": "toChain",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The token that should be transferred. Can be the address or the symbol",
"location": "query",
"name": "fromToken",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The token that should be transferred to. Can be the address or the symbol",
"location": "query",
"name": "toToken",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The sending wallet address",
"location": "query",
"name": "fromAddress",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "The receiving wallet address. If none is provided, the fromAddress will be used",
"location": "query",
"name": "toAddress",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals))",
"location": "query",
"name": "fromAmount",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Which kind of route should be preferred **FASTEST**: This sorting criterion prioritizes routes with the shortest estimated execution time. Users who value speed and want their transactions to be completed as quickly as possible should choose the fastest routes. **CHEAPEST**: This criterion focuses on minimizing the cost of the transaction, whether in token amount or USD amount (USD amount minus gas cost). Users looking for the most economical option should choose the cheapest routes.",
"enum_values": [
"FASTEST",
"CHEAPEST"
],
"location": "query",
"name": "order",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.",
"location": "query",
"maximum": "1",
"minimum": "0",
"name": "slippage",
"nullable": false,
"required": false,
"type": "number"
},
{
"description": "A string containing tracking information about the integrator of the API",
"location": "query",
"name": "integrator",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount should be less than 100%.",
"location": "query",
"maximum": "1",
"minimum": "0",
"name": "fee",
"nullable": false,
"required": false,
"type": "number"
},
{
"description": "A string containing tracking information about the referrer of the integrator",
"location": "query",
"name": "referrer",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "allowBridges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "allowExchanges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "denyBridges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "denyExchanges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "One to 100 AMM pool or Solana venue identifiers to exclude from routing. Repeat the query parameter for multiple entries. Each entry is a non-zero Uniswap V2/V3 pool address (`0x` + 40 hex), a Uniswap V4 composite `-` 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. 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.",
"item_type": "string",
"location": "query",
"name": "denyPools",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "preferBridges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.",
"item_type": "string",
"location": "query",
"name": "preferExchanges",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is `true`.",
"location": "query",
"name": "allowDestinationCall",
"nullable": false,
"required": false,
"type": "boolean"
},
{
"description": "The amount of the token to convert to gas on the destination side.",
"location": "query",
"name": "fromAmountForGas",
"nullable": false,
"required": false,
"type": "string"
},
{
"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%.",
"location": "query",
"name": "maxPriceImpact",
"nullable": false,
"required": false,
"type": "number"
},
{
"description": "Timing setting to wait for a certain amount of swap rates. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.",
"item_type": "string",
"location": "query",
"name": "swapStepTimingStrategies",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "Timing setting to wait for a certain amount of routes to be generated before chosing the best one. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.",
"item_type": "string",
"location": "query",
"name": "routeTimingStrategies",
"nullable": false,
"required": false,
"type": "array"
},
{
"description": "Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate.",
"location": "query",
"name": "skipSimulation",
"nullable": false,
"required": false,
"type": "boolean"
},
{
"description": "Pre-configured routing 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 parameters set in the request.",
"location": "query",
"max_length": 50,
"min_length": 1,
"name": "preset",
"nullable": false,
"required": false,
"type": "string"
},
{
"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 for the environment. Jito requests always use v0. Size overflow may fall back to v0. Read transactionRequest.svmTransactionVersion for the version actually built. Ignored for source chains other than Solana.",
"enum_values": [
"0",
"1"
],
"location": "query",
"name": "svmMaxSupportedTransactionVersion",
"nullable": true,
"required": false,
"type": "number"
},
{
"description": "Priority fee level for Solana Virtual Machine (SVM) transactions.",
"enum_values": [
"NORMAL",
"FAST",
"ULTRA"
],
"location": "query",
"name": "svmPriorityFeeLevel",
"nullable": false,
"required": false,
"type": "string"
},
{
"description": "Scope of `slippage`. `step` (default, same as omitted): `slippage` applies to every step and `toAmountMin` combines the steps' minimums. `route`: `slippage` is the budget for the whole route, `toAmountMin` is one floor, `ceil(expected output × (1 − slippage))`, that the returned transaction enforces, and the response carries a `routeSlippage` commitment. Supported for EVM routes with at most one swap: a swap on one chain, or a bridge that delivers to the recipient with or without one swap before it. Other routes are refused with `ROUTE_SLIPPAGE_UNSUPPORTED` instead of falling back to step scope. When `slippage` is omitted, the budget is the default slippage. See [Route-wide Slippage](/guides/route-wide-slippage).",
"enum_values": [
"step",
"route"
],
"location": "query",
"name": "slippageScope",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Documentation example (source abbreviated)",
"request": {
"body": null,
"headers": {},
"path": {},
"query": {
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "100000000",
"fromChain": "1",
"fromToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"toChain": "10",
"toToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
}
},
"response_body": {
"action": {
"fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"fromAmount": "100000000",
"fromChainId": 1,
"fromToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"chainId": 1,
"coinKey": "USDC",
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
"name": "USD Coin",
"priceUSD": "1.0002350525",
"symbol": "USDC",
"tags": [],
"verificationStatus": "verified",
"verificationStatusBreakdown": []
},
"slippage": 0.010701365645379253,
"toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"toChainId": 10,
"toToken": {
"address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
"chainId": 10,
"coinKey": "USDC",
"decimals": 6,
"logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6",
"name": "USD Coin",
"priceUSD": "1.0008373187",
"symbol": "USDC",
"tags": [],
"verificationStatus": "verified",
"verificationStatusBreakdown": []
}
},
"estimate": {
"approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"executionDuration": 2,
"feeCosts": [
{}
],
"fromAmount": "100000000",
"fromAmountUSD": "100.0235",
"gasCosts": [
{}
],
"toAmount": "99739729",
"toAmountMin": "99739729",
"toAmountUSD": "99.8232",
"tool": "across"
},
"id": "1823bb48-1821-45b1-8e7c-8f97d5698844:0",
"includedSteps": [
{
"action": {},
"estimate": {},
"id": "3d3175b2-2e23-46bb-a62e-47f41b7c3e41",
"tool": "feeCollection",
"toolDetails": {},
"type": "protocol"
}
],
"integrator": "lifi-api",
"recommendedSlippage": 0.01099856322858362,
"stepSimulation": {
"gasSource": "simulation",
"status": "success"
},
"tool": "across",
"toolDetails": {
"key": "across",
"logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg",
"name": "AcrossV4"
},
"transactionId": "0x51d045f404866b9fc560f7806db5eecc183f0ad68409d563608198466803b33c",
"transactionRequest": {
"chainId": 1,
"data": "0x1794958f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000",
"from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
"gasLimit": "0x425d3",
"gasPrice": "0x2d4a467",
"to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE",
"value": "0x0"
},
"type": "lifi"
}
}
]
}
```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 29
Review these request fields before running. Keep the published provider and request method unchanged.
fromChain- The sending chain. Can be the chain id or chain key
toChain- The receiving chain. Can be the chain id or chain key
fromToken- The token that should be transferred. Can be the address or the symbol
toToken- The token that should be transferred to. Can be the address or the symbol
fromAddress- The sending wallet address
toAddress- The receiving wallet address. If none is provided, the fromAddress will be used
fromAmount- The amount that should be sent including all decimals (e.g. 1000000 for 1 USDC (6 decimals))
order- Which kind of route should be preferred **FASTEST**: This sorting criterion prioritizes routes with the shortest estimated execution time. Users who value speed and want their transactions to be completed as quickly as possible should choose the fastest routes. **CHEAPEST**: This criterion focuses on minimizing the cost of the transaction, whether in token amount or USD amount (USD amount minus gas cost). Users looking for the most economical option should choose the cheapest routes.
slippage- The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.
integrator- A string containing tracking information about the integrator of the API
fee- The percent of the integrator's fee that is taken from every transaction. 0.02 represents 2%. The maximum fee amount should be less than 100%.
referrer- A string containing tracking information about the referrer of the integrator
allowBridges- List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
allowExchanges- List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
denyBridges- List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
denyExchanges- List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
denyPools- One to 100 AMM pool or Solana venue identifiers to exclude from routing. Repeat the query parameter for multiple entries. Each entry is a non-zero Uniswap V2/V3 pool address (`0x` + 40 hex), a Uniswap V4 composite `-` 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. 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.
preferBridges- List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
preferExchanges- List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Also values `all`, `none`, `default` and `[]` are acceptable and mean all tools of the current type (`all`), no tools (for `none` and `[]` cases) and default tool's settings on the current stage.
allowDestinationCall- Whether swaps or other contract calls should be allowed as part of the destination transaction of a bridge transfer. Separate swap transactions on the destination chain are not affected by this flag. By default, parameter is `true`.
fromAmountForGas- The amount of the token to convert to gas on the destination side.
maxPriceImpact- 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%.
swapStepTimingStrategies- Timing setting to wait for a certain amount of swap rates. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.
routeTimingStrategies- Timing setting to wait for a certain amount of routes to be generated before chosing the best one. In the format `minWaitTime-${minWaitTimeMs}-${startingExpectedResults}-${reduceEveryMs}`. Please check [docs.li.fi](https://docs.li.fi) for more details.
skipSimulation- Parameter to skip transaction simulation. The quote will be returned faster but the transaction gas limit won't be accurate.
preset- Pre-configured routing 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 parameters set in the request.
svmMaxSupportedTransactionVersion- Maximum Solana transaction version the client can sign. Defaults to 0; omission or null uses v0. Set to 1 to allow V1 where enabled for the environment. Jito requests always use v0. Size overflow may fall back to v0. Read transactionRequest.svmTransactionVersion for the version actually built. Ignored for source chains other than Solana.
svmPriorityFeeLevel- Priority fee level for Solana Virtual Machine (SVM) transactions.
slippageScope- Scope of `slippage`. `step` (default, same as omitted): `slippage` applies to every step and `toAmountMin` combines the steps' minimums. `route`: `slippage` is the budget for the whole route, `toAmountMin` is one floor, `ceil(expected output × (1 − slippage))`, that the returned transaction enforces, and the response carries a `routeSlippage` commitment. Supported for EVM routes with at most one swap: a swap on one chain, or a bridge that delivers to the recipient with or without one swap before it. Other routes are refused with `ROUTE_SLIPPAGE_UNSUPPORTED` instead of falling back to step scope. When `slippage` is omitted, the budget is the default slippage. See [Route-wide Slippage](/guides/route-wide-slippage).
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/lifi/v1/quote?fromAddress=0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0&fromAmount=100000000&fromChain=1&fromToken=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48&toChain=10&toToken=0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "action": { "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromAmount": "100000000", "fromChainId": 1, "fromToken": { "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "chainId": 1, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6", "name": "USD Coin", "priceUSD": "1.0002350525", "symbol": "USDC", "tags": [], "verificationStatus": "verified", "verificationStatusBreakdown": [] }, "slippage": 0.010701365645379253, "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "toChainId": 10, "toToken": { "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85", "chainId": 10, "coinKey": "USDC", "decimals": 6, "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6", "name": "USD Coin", "priceUSD": "1.0008373187", "symbol": "USDC", "tags": [], "verificationStatus": "verified", "verificationStatusBreakdown": [] } }, "estimate": { "approvalAddress": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "executionDuration": 2, "feeCosts": [ {} ], "fromAmount": "100000000", "fromAmountUSD": "100.0235", "gasCosts": [ {} ], "toAmount": "99739729", "toAmountMin": "99739729", "toAmountUSD": "99.8232", "tool": "across" }, "id": "1823bb48-1821-45b1-8e7c-8f97d5698844:0", "includedSteps": [ { "action": {}, "estimate": {}, "id": "3d3175b2-2e23-46bb-a62e-47f41b7c3e41", "tool": "feeCollection", "toolDetails": {}, "type": "protocol" } ], "integrator": "lifi-api", "recommendedSlippage": 0.01099856322858362, "stepSimulation": { "gasSource": "simulation", "status": "success" }, "tool": "across", "toolDetails": { "key": "across", "logoURI": "https://raw.githubusercontent.com/lifinance/types/main/src/assets/icons/bridges/across.svg", "name": "AcrossV4" }, "transactionId": "0x51d045f404866b9fc560f7806db5eecc183f0ad68409d563608198466803b33c", "transactionRequest": { "chainId": 1, "data": "0x1794958f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000", "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "gasLimit": "0x425d3", "gasPrice": "0x2d4a467", "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "value": "0x0" }, "type": "lifi" }
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 quote for a token transfer with your agent
Inspect endpoint contracts and confirm availability and pricing before a paid call.