APICrypto & DeFi

LI.FI — Perform multiple contract calls across blockchains (BETA)

Retrieve perform multiple contract calls across blockchains (BETA) with the LI.FI API. Supply a contract calls and a from address. Sample fields include addresses and symbols. Use it in blockchain research or an on-chain monitoring dashboard. Use the response in blockchain monitoring or to cross-check data against an explorer for the same network.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
—Loading...
Success rate · 30d
—Loading...
USE THIS API

LI.FI — Perform multiple contract calls across blockchains (BETA)

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
Pricing
Connect your agent
On this page

Playground

Run sends a real API request. Charges follow the published API contract.

Request parameters
body* object
contractCalls* array
The wallet that will send the transaction and contains the starting token
The sending chain. Can be the chain id or chain key
The token that should be transferred. Can be the address or the symbol
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.
The receiving chain. Can be the chain id or chain key
The token required to perform the contract interaction (can be something to stake, donate or to be used as payment)
Optional parameters (13)
allowBridges array
List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
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 array
List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
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 array
List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
denyExchanges array
List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
The percent of the integrator's fee that is taken from every transaction. The maximum fee amount should be less than 100%.
A string containing tracking information about the integrator of the API
preferBridges array
List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
preferExchanges array
List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
A string containing tracking information about the referrer of the integrator
The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.
If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used.
Object defining instructions on how to perform multiple cross-chain/same-chain calls

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"
}

Response result

Response structure

Inferred from examples
  • actionobject
    • fromAddressstring
    • fromAmountstring
    • fromChainIdinteger
    • fromTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsunknown[]
      • verificationStatusstring
      • verificationStatusBreakdownunknown[]
    • slippagenumber
    • toAddressstring
    • toChainIdinteger
    • toTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsunknown[]
      • verificationStatusstring
      • verificationStatusBreakdownunknown[]
  • estimateobject
    • approvalAddressstring
    • executionDurationinteger
    • feeCostsobject[]
    • fromAmountstring
    • fromAmountUSDstring
    • gasCostsobject[]
    • toAmountstring
    • toAmountMinstring
    • toAmountUSDstring
    • toolstring
  • idstring
  • includedStepsobject[]
    • actionobject
    • estimateobject
    • idstring
    • toolstring
    • toolDetailsobject
    • typestring
  • stepSimulationobject
    • gasSourcestring
    • statusstring
  • toolstring
  • toolDetailsobject
    • keystring
    • logoURIstring
    • namestring
  • transactionIdstring
  • transactionRequestobject
    • chainIdinteger
    • datastring
    • fromstring
    • gasLimitstring
    • gasPricestring
    • tostring
    • valuestring
  • typestring

Sellers

SellerPricingRequests · 30dPerformanceAccess
lifiCurrent
LI.FI — Perform multiple contract calls across blockchains (BETA) · POST · View API reference
$0 / call—
—successP50—
Loading...
Selected pricing · lifiUSD / call
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: 3. Price update time: not supplied.

calls

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
curl \
  '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"
}'

Input parameters

Fields in this listing; additional options and input encoding can vary by provider.

ParameterLocationTypeRequiredDescription
allowBridgesJSON request bodybodyarrayNoList of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.allowBridges[] · Array item · string

allowDestinationCallJSON request bodybodybooleanNoWhether 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`.
allowExchangesJSON request bodybodyarrayNoList of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.allowExchanges[] · Array item · string

contractCallsJSON request bodybodyarrayYes
Nested fields and variants

body.contractCalls[] · Array item · object

Nested fields and variants
body.contractCalls[].fromAmount string · Required

Parent object: body.contractCalls[]

The amount that will feed into this contract call. This is not dependent on how much was bridged or deposited before - it's the *expected* amount of token available on order to execute the call.
body.contractCalls[].fromTokenAddress string · Required

Parent object: body.contractCalls[]

The token that will feed into this contract call. E.g. a ETH staking transaction would expect to have ETH available.
body.contractCalls[].toApprovalAddress string · Optional

Parent object: body.contractCalls[]

If the approval address is different thant the contract to call, specify that address here
body.contractCalls[].toContractAddress string · Required

Parent object: body.contractCalls[]

The address of the contract to interact with.
body.contractCalls[].toContractCallData string · Required

Parent object: body.contractCalls[]

The calldata to be sent to the contract for the interaction on the destination chain.
body.contractCalls[].toContractGasLimit string · Required

Parent object: body.contractCalls[]

The estimated gas used by the destination call. If this value is incorrect, the interaction may fail -- choose this carefully!
body.contractCalls[].toTokenAddress string · Optional

Parent object: body.contractCalls[]

If the contract outputs a token, specify its address here. (E.g. staking ETH produces stETH)
contractOutputsTokenJSON request bodybodystringNoSome 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.
denyBridgesJSON request bodybodyarrayNoList of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.denyBridges[] · Array item · string

denyExchangesJSON request bodybodyarrayNoList of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.denyExchanges[] · Array item · string

feeJSON request bodybodynumberNoThe 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

fromAddressJSON request bodybodystringYesThe wallet that will send the transaction and contains the starting token
fromChainJSON request bodybodynumberYesThe sending chain. Can be the chain id or chain key
fromTokenJSON request bodybodystringYesThe token that should be transferred. Can be the address or the symbol
integratorJSON request bodybodystringNoA string containing tracking information about the integrator of the API
preferBridgesJSON request bodybodyarrayNoList of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.preferBridges[] · Array item · string

preferExchangesJSON request bodybodyarrayNoList of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.
Nested fields and variants

body.preferExchanges[] · Array item · string

referrerJSON request bodybodystringNoA string containing tracking information about the referrer of the integrator
slippageJSON request bodybodynumberNoThe maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.

minimum: 0 · maximum: 1 · format: double

toAmountJSON request bodybodystringYesThe 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.
toChainJSON request bodybodynumberYesThe receiving chain. Can be the chain id or chain key
toFallbackAddressJSON request bodybodystringNoIf the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used.
toTokenJSON request bodybodystringYesThe token required to perform the contract interaction (can be something to stake, donate or to be used as payment)

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.

Documentation example (source abbreviated)
{
  "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"
}

Agent integration

Copy the resource contract without sharing an API key.

View API Markdown
API Markdown
# LI.FI — Perform multiple contract calls across blockchains (BETA)

Retrieve perform multiple contract calls across blockchains (BETA) with the LI.FI API. Supply a contract calls and a from address. Sample fields include addresses and symbols. Use it in blockchain research or an on-chain monitoring dashboard. Use the response in blockchain monitoring or to cross-check data against an explorer for the same network.
## Available implementations
lifi · LI.FI — Perform multiple contract calls across blockchains (BETA): https://openany.si/markets/apis/capabilities/lifi-li-fi-perform-multiple-contract-calls-across-blockchains-beta?offering=7dd239de-ff7b-4969-b948-bb03a4aec71e · $0 / call

## Selected API contract
Documentation: https://openany.si/apis/7dd239de-ff7b-4969-b948-bb03a4aec71e
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/lifi/v1/quote/contractCalls
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/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"
}'
```

## API contract
```json
{
  "resource_type": "api",
  "name": "LI.FI — Perform multiple contract calls across blockchains (BETA)",
  "endpoint": "https://api.openany.si/v1/agent-apis/lifi/v1/quote/contractCalls",
  "method": "POST",
  "content_type": "application/json",
  "execution_mode": "sync",
  "authentication": {
    "type": "bearer",
    "environment_variable": "OPENANY_API_KEY"
  },
  "inputs": [
    {
      "description": "Object defining instructions on how to perform multiple cross-chain/same-chain calls",
      "json_schema": {
        "description": "Object defining instructions on how to perform multiple cross-chain/same-chain calls",
        "examples": [
          {
            "contractCalls": [],
            "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
            "fromChain": 1,
            "fromToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "toAmount": "100000000",
            "toChain": 10,
            "toToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
          }
        ],
        "properties": {
          "allowBridges": {
            "description": "List of bridges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "allowDestinationCall": {
            "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`.",
            "type": "boolean"
          },
          "allowExchanges": {
            "description": "List of exchanges that are allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "contractCalls": {
            "example": [],
            "items": {
              "description": "Object defining a single arbitrary contract call",
              "properties": {
                "fromAmount": {
                  "description": "The amount that will feed into this contract call. This is not dependent on how much was bridged or deposited before - it's the *expected* amount of token available on order to execute the call.",
                  "type": "string"
                },
                "fromTokenAddress": {
                  "description": "The token that will feed into this contract call. E.g. a ETH staking transaction would expect to have ETH available.",
                  "type": "string"
                },
                "toApprovalAddress": {
                  "description": "If the approval address is different thant the contract to call, specify that address here",
                  "type": "string"
                },
                "toContractAddress": {
                  "description": "The address of the contract to interact with.",
                  "type": "string"
                },
                "toContractCallData": {
                  "description": "The calldata to be sent to the contract for the interaction on the destination chain.",
                  "type": "string"
                },
                "toContractGasLimit": {
                  "description": "The estimated gas used by the destination call. If this value is incorrect, the interaction may fail -- choose this carefully!",
                  "type": "string"
                },
                "toTokenAddress": {
                  "description": "If the contract outputs a token, specify its address here. (E.g. staking ETH produces stETH)",
                  "type": "string"
                }
              },
              "required": [
                "fromAmount",
                "fromTokenAddress",
                "toContractAddress",
                "toContractCallData",
                "toContractGasLimit"
              ],
              "title": "Root Type for ContractCall",
              "type": "object"
            },
            "type": "array"
          },
          "contractOutputsToken": {
            "description": "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.",
            "type": "string"
          },
          "denyBridges": {
            "description": "List of bridges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "denyExchanges": {
            "description": "List of exchanges that are not allowed for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "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"
          },
          "fromAddress": {
            "description": "The wallet that will send the transaction and contains the starting token",
            "example": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
            "type": "string"
          },
          "fromChain": {
            "description": "The sending chain. Can be the chain id or chain key",
            "example": 1,
            "type": "number"
          },
          "fromToken": {
            "description": "The token that should be transferred. Can be the address or the symbol",
            "example": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "type": "string"
          },
          "integrator": {
            "description": "A string containing tracking information about the integrator of the API",
            "type": "string"
          },
          "preferBridges": {
            "description": "List of bridges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "preferExchanges": {
            "description": "List of exchanges that should be preferred for this transaction. Retrieve the current catalog from the `/v1/tools` endpoint.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "referrer": {
            "description": "A string containing tracking information about the referrer of the integrator",
            "type": "string"
          },
          "slippage": {
            "description": "The maximum allowed slippage for the transaction as a decimal value. 0.005 represents 0.5%.",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "toAmount": {
            "description": "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.",
            "example": "100000000",
            "type": "string"
          },
          "toChain": {
            "description": "The receiving chain. Can be the chain id or chain key",
            "example": 10,
            "type": "number"
          },
          "toFallbackAddress": {
            "description": "If the call fails, use this address to send the bridged tokens to. If none is specified, the sending address will be used.",
            "type": "string"
          },
          "toToken": {
            "description": "The token required to perform the contract interaction (can be something to stake, donate or to be used as payment)",
            "example": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
            "type": "string"
          }
        },
        "required": [
          "fromChain",
          "fromToken",
          "fromAddress",
          "toChain",
          "toToken",
          "toAmount",
          "contractCalls"
        ],
        "title": "Root type for ContractCallsRequest",
        "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": {
          "contractCalls": [],
          "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
          "fromChain": 1,
          "fromToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
          "toAmount": "100000000",
          "toChain": 10,
          "toToken": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
        },
        "headers": {},
        "path": {},
        "query": {}
      },
      "response_body": {
        "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"
      }
    }
  ]
}
```

Error handling

StatusNext step
400Check the offering and request fields.
401 / 403Verify your credentials and access permissions.
402Inspect the selected access mode and returned payment requirements.
429Respect the returned rate limit and retry guidance.
5xxInspect 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.

  1. 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 / Linux
    printf 'OpenAny API key: '
    read -r -s OPENANY_API_KEY
    export OPENANY_API_KEY
    printf '\n'
  2. 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 · cURL
    curl \
      '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"
    }'
  3. 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"
    }

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 — Perform multiple contract calls across blockchains (BETA) with your agent

Inspect endpoint contracts and confirm availability and pricing before a paid call.