LI.FI Contract Calls Quote API
Get LI.FI Contract Calls Quote data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Lifi, pass parameters such as fromAddress, fromChain, fromToken, and retrieve structured data including estimated destination token amount, to amount min, estimated network gas costs, quoted transfer fee components, and prepared transaction data to review contract-call quotes, and separate simulation and execution.
- 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 Contract Calls Quote API
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- API
- Pricing
On this page
Overview
LI.FI Contract Calls Quote API
POST the contract-call request object directly as JSON. The beta operation constructs a quote and transactionRequest; inspect stepSimulation and estimates before any separate execution.
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 — Perform multiple contract calls across blockchains (BETA) |
| Billing | See the pricing area for the selected implementation and request options |
What You Can Build
- Review contract-call quotes: Inspect action and fee estimates together.
- Separate simulation and execution: Read simulation status without treating it as a completed on-chain call.
Returned Data
| Field | Meaning |
|---|---|
action.fromAmount |
Source token amount in base units |
estimate.toAmount |
Estimated destination token amount |
estimate.toAmountMin |
Minimum destination amount for the quoted step |
estimate.gasCosts |
Estimated network gas costs |
estimate.feeCosts |
Quoted transfer fee components |
transactionRequest |
Prepared transaction data |
stepSimulation |
Transaction simulation 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/quote/contractCalls \
-H "Authorization: Bearer ${OPENANY_API_KEY}" \
-H "Content-Type: application/json" \
--data-raw '{"fromAddress":"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0","fromChain":1,"fromToken":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","toAmount":"100000000","toChain":10,"toToken":"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 Contract Calls Quote 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 — Perform multiple contract calls across blockchains (BETA) · 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/quote/contractCalls- 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 |
|---|---|---|---|---|
contractCalls | JSON request bodybody | array | Yes | Nested fields and variants
Nested fields and variants
|
fromAddress | JSON request bodybody | string | Yes | The wallet that will send the transaction and contains the starting token |
fromChain | JSON request bodybody | number | Yes | The sending chain. Can be the chain id or chain key |
fromToken | JSON request bodybody | string | Yes | The token that should be transferred. Can be the address or the symbol |
toAmount | JSON request bodybody | string | Yes | The amount of token required by the contract interaction. The LI.FI API will try and generate a quote that guarantees at least that amount on the destination chain. |
toChain | JSON request bodybody | number | Yes | The receiving chain. Can be the chain id or chain key |
toToken | JSON request bodybody | string | Yes | The token required to perform the contract interaction (can be something to stake, donate or to be used as payment) |
allowBridges | JSON request bodybody | array | No | List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
allowDestinationCall | JSON request bodybody | 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`. |
allowExchanges | JSON request bodybody | array | No | List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
contractOutputsToken | JSON request bodybody | string | No | Some contract interactions will output a token. This is the case in things like staking. Omit this parameter if no token should be returned to the user. |
denyBridges | JSON request bodybody | array | No | List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
denyExchanges | JSON request bodybody | array | No | List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
fee | JSON request bodybody | number | No | The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%. minimum: 0 · format: double |
integrator | JSON request bodybody | string | No | A string containing tracking information about the integrator of the API |
preferBridges | JSON request bodybody | array | No | List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
preferExchanges | JSON request bodybody | array | No | List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint. Nested fields and variants
|
referrer | JSON request bodybody | string | No | A string containing tracking information about the referrer of the integrator |
slippage | JSON request bodybody | number | No | The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%. minimum: 0 · maximum: 1 · format: double |
toFallbackAddress | JSON request bodybody | string | No | If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used. |
Required markers inside a nested object or variant apply when that object or variant is used.
Response structure
actionobjectfromAddressstringfromAmountstringfromChainIdintegerfromTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsunknown[]verificationStatusstringverificationStatusBreakdownunknown[]
slippagenumbertoAddressstringtoChainIdintegertoTokenobjectaddressstringchainIdintegercoinKeystringdecimalsintegerlogoURIstringnamestringpriceUSDstringsymbolstringtagsunknown[]verificationStatusstringverificationStatusBreakdownunknown[]
estimateobjectapprovalAddressstringexecutionDurationintegerfeeCostsobject[]fromAmountstringfromAmountUSDstringgasCostsobject[]toAmountstringtoAmountMinstringtoAmountUSDstringtoolstring
idstringincludedStepsobject[]actionobjectestimateobjectidstringtoolstringtoolDetailsobjecttypestring
stepSimulationobjectgasSourcestringstatusstring
toolstringtoolDetailsobjectkeystringlogoURIstringnamestring
transactionIdstringtransactionRequestobjectchainIdintegerdatastringfromstringgasLimitstringgasPricestringtostringvaluestring
typestring
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- Object defining instructions on how to perform multiple cross-chain/same-chain calls
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/lifi/v1/quote/contractCalls' \ -X POST \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json' \ --data-raw '{ "contractCalls": [], "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromChain": 1, "fromToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", "toAmount": "100000000", "toChain": 10, "toToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85" }'Check the response
Sample response · Documented HTTP 200
Sample response{ "action": { "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "fromAmount": "100762253", "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.005, "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": "100762253", "fromAmountUSD": "100.7859", "gasCosts": [ {} ], "toAmount": "100500002", "toAmountMin": "100500002", "toAmountUSD": "100.5842", "tool": "across" }, "id": "73954de5-7a05-41bc-b646-a5efc485d2ca:0", "includedSteps": [ { "action": {}, "estimate": {}, "id": "7139794b-096f-4a12-9010-d201c3cf4fb8", "tool": "feeCollection", "toolDetails": {}, "type": "protocol" } ], "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": "0x032bc7a418167823b1132dca3b8621f59daf55ce89df59ba1ecc28301e705e2d", "transactionRequest": { "chainId": 1, "data": "0x1794958f000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000", "from": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0", "gasLimit": "0x422c7", "gasPrice": "0x2d4a467", "to": "0x1231DEB6f5749EF6cE6943a275A1D3E7486F4EaE", "value": "0x0" }, "type": "lifi" }