OpenAny
Get API keyAPI Key
APICrypto & DeFi

lifi logo
LI.FI Advanced Routes API

Get LI.FI Advanced Routes data via REST or OpenAny MCP—with pay-per-use pricing and no subscription. Powered by Lifi, pass parameters such as fromAddress, fromAmount, fromChainId, and retrieve structured data including available route alternatives, route identifier, estimated destination amount, minimum quoted destination amount, and unavailable-route metadata to compare route estimates, and explain missing alternatives.

Selected price
$0 / callPublished pricing
Sellers / APIs
1 / 1
Requests · 30d
0Selected implementation · last 30 days
Success rate · 30d
—No requests in this period
USE THIS API

LI.FI Advanced Routes API

Prepare your request, then continue with your agent.

Selected price

$0 / call

Provider
API
Pricing
Connect your agent
On this page

Overview

Overview
LI.FI Advanced Routes API

LI.FI Advanced Routes API

POST the transfer request object as the JSON body, rather than wrapping it inside a body property. Reference request fields include fromChainId, toChainId, fromTokenAddress, toTokenAddress, fromAmount and options.

Quick Facts

Fact Value
Access OpenAny REST
Authentication OpenAny API key in the Authorization header
Core inputs Required JSON body: body
Selected implementation lifi · LI.FI — Get a set of routes for a request that describes a transfer of tokens
Billing See the pricing area for the selected implementation and request options

What You Can Build

  • Compare route estimates: Keep route IDs with amount estimates.
  • Explain missing alternatives: Read unavailableRoutes when no desired route is returned.

Returned Data

Field Meaning
routes Available route alternatives
routes[].id Route identifier
routes[].fromAmount Source amount in base units
routes[].toAmount Estimated destination amount
routes[].toAmountMin Minimum quoted destination amount
unavailableRoutes Unavailable-route metadata

Quick Start

  1. Set OPENANY_API_KEY to your OpenAny API key.
  2. Review the selected implementation and pricing, then adapt the request below to your target.
  3. Check the HTTP response and business result before reading optional fields.
bash
curl --request POST \
  https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes \
  -H "Authorization: Bearer ${OPENANY_API_KEY}" \
  -H "Content-Type: application/json" \
  --data-raw '{"fromAddress":"0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0","fromAmount":"100000000","fromChainId":1,"fromTokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","options":{"slippage":0.005},"toChainId":10,"toTokenAddress":"0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"}'

Request and Response Examples

The response example is a documentation reference and may be abbreviated. The documented request is a calling template; use the published contract and returned response for the selected implementation.

Published LI.FI Advanced Routes API implementation contract.

Pricing and Billing

The pricing area reflects the selected API implementation. Review its billing unit and any request-dependent rules before calling; a source service's public availability does not determine OpenAny billing.

Frequently Asked Questions

View FAQ

Related APIs

Playground

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

Request parameters
body*object

body

A description of a token transfer

Sample response

Run a request to see the actual response. Published samples are in Examples.

Response result

Sellers

SellerPricingRequests · 30dPerformanceAccess
lifiCurrent
LI.FI — Get a set of routes for a request that describes a transfer of tokens · POST · View API reference
$0 / call0
—successP50—
Selected implementation traffic · 11/3/2026 – 12/3/2026 (UTC)
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: 4. Price update time: not supplied.

calls

Total $0

API

Method
POST
Endpoint
https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes
Content type
application/json
Authentication
Authorization: Bearer $OPENANY_API_KEY
View request and response examples

Input parameters

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

ParameterLocationTypeRequiredDescription
fromAmountJSON request bodybodystringYes

The amount that should be transferred including all decimals (e.g. 1000000 for 1 USDC (6 decimals))

fromChainIdJSON request bodybodynumberYes

The sending chain id

format: number

fromTokenAddressJSON request bodybodystringYes

The address of the sending `Token`

toChainIdJSON request bodybodynumberYes

The id of the receiving chain

format: number

toTokenAddressJSON request bodybodystringYes

The address of the receiving `Token`

fromAddressJSON request bodybodystringNo

The sending wallet address

fromAmountForGasJSON request bodybodystringNo

The amount of the token to convert to gas on the destination side.

optionsJSON request bodybodyobjectNo

Optional configuration for the routes

Nested fields and variants
body.options.allowDestinationCall boolean · Optional

Parent object: body.options

Defines if we should return routes with a cross-chain bridge protocol (Connext, etc.) destination calls or not.
body.options.allowSwitchChain boolean · Optional

Parent object: body.options

Whether chain switches should be allowed in the routes
body.options.bridges object · Optional

Parent object: body.options

Object configuring the bridges that should or should not be taken into consideration for the possibilities
Nested fields and variants
body.options.bridges.allow array · Optional

Parent object: body.options.bridges

Nested fields and variants

body.options.bridges.allow[] · Array item · string

body.options.bridges.deny array · Optional

Parent object: body.options.bridges

Nested fields and variants

body.options.bridges.deny[] · Array item · string

body.options.bridges.prefer array · Optional

Parent object: body.options.bridges

Nested fields and variants

body.options.bridges.prefer[] · Array item · string

body.options.distributionFees array · Optional

Parent object: body.options

Optional array of partner-specified fee distributions. Each entry transfers its `percentage` of the source `fromAmount` to the `receiver` address in parallel with the integrator fee and any intermediary carve-out. Same validation and chain-support rules as the /quote `distributionFees` query parameter. On EVM and Tron this requires FeeForwarder; on Solana each receiver is a transfer instruction and at most 2 entries are accepted. The `receiver` form must match the source chain. Limits: 1..10 entries, each `percentage` in (0, 0.5); total of all distribution percentages plus the integrator `fee` must be strictly less than 1. Receivers are sanctions-screened at transaction-build time. On Solana swap-and-bridge routes the percentages apply to the swap output in the intermediate token.

minItems: 1 · maxItems: 10

Nested fields and variants

body.options.distributionFees[] · Array item · object

Nested fields and variants
body.options.distributionFees[].percentage number · Required

Parent object: body.options.distributionFees[]

Fraction of the source token's `fromAmount` to transfer to the receiver (on Solana swap-and-bridge routes, use the swap output in the intermediate token instead). Must be greater than 0 and strictly less than 0.5 per entry; the total of all distributionFees percentages plus the integrator `fee` must remain strictly less than 1.

format: double

body.options.distributionFees[].receiver string · Required

Parent object: body.options.distributionFees[]

Recipient address in the form of the source chain: 20-byte 0x-prefixed hex on EVM/Tron (all-lowercase or a valid EIP-55 checksum), base58 public key on Solana. A receiver whose form does not match the source chain is rejected.

pattern: ^(0x[0-9a-fA-F]{40}|[1-9A-HJ-NP-Za-km-z]{32,44})$

body.options.exchanges object · Optional

Parent object: body.options

Object configuring the exchanges that should or should not be taken into consideration for the possibilities
Nested fields and variants
body.options.exchanges.allow array · Optional

Parent object: body.options.exchanges

Nested fields and variants

body.options.exchanges.allow[] · Array item · string

body.options.exchanges.deny array · Optional

Parent object: body.options.exchanges

Nested fields and variants

body.options.exchanges.deny[] · Array item · string

body.options.exchanges.prefer array · Optional

Parent object: body.options.exchanges

Nested fields and variants

body.options.exchanges.prefer[] · Array item · string

body.options.fee number · Optional

Parent object: body.options

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

body.options.insurance boolean · Optional

Parent object: body.options

Facilitates transfer insurance via insurace.io, ensuring secure and insured transfer of assets.
body.options.integrator string · Optional

Parent object: body.options

Custom string the developer who integrates LiFi can set
body.options.maxPriceImpact number · Optional

Parent object: body.options

The price impact threshold above which routes are hidden. As an example, one should specify 0.15 (15%) to hide routes with more than 15% price impact. The default is 10%.

format: double

body.options.order string · Optional

Parent object: body.options

The way the resulting routes should be ordered

enum: "FASTEST", "CHEAPEST"

body.options.pools object · Optional

Parent object: body.options

AMM pools or Solana venues that should not be considered for routing. Nested under `options.pools.deny` on POST `/v1/advanced/routes`. Only some exchanges can exclude pools: EVM pool entries restrict swaps on every chain except Solana to the `fly` exchange, and Solana program IDs restrict swaps on Solana to `jupiter`, `titan` and `okx`. Swaps on a chain with no matching entries are not restricted. The list is not carried in the returned steps: pass it again as the `denyPools` query parameter on every POST `/v1/advanced/stepTransaction` request.
Nested fields and variants
body.options.pools.deny array | null · Optional

Parent object: body.options.pools

One to 100 AMM pool or Solana venue identifiers to exclude. Each entry is a non-zero Uniswap V2/V3 pool address (`0x` + 40 hex), a Uniswap V4 composite `<poolManagerAddress>-<poolId>` where `poolId` is a 32-byte hex string (`0x` + 64 hex), or a Solana venue program ID (base58), which excludes every pool of that venue. Identifiers of other chains are rejected; individual Solana pool addresses are not supported.

minItems: 1 · maxItems: 100

Nested fields and variants

body.options.pools.deny[] · Array item · string

body.options.preset string · Optional

Parent object: body.options

Pre-configured routing and quote optimization preset. The preset value `stablecoin` is supported for requesting swap and/or bridging operations involving stablecoin tokens. Each preset provides optimized default settings for slippage, price impact, and tool preferences that can be overridden by custom configuration options specified in the same request.

minLength: 1 · maxLength: 50 · pattern: ^[a-zA-Z0-9-_]+$

body.options.referrer string · Optional

Parent object: body.options

Integrators can set a wallet address as referrer to track them
body.options.slippage number · Optional

Parent object: body.options

The maximum allowed slippage

format: double

body.options.svmMaxSupportedTransactionVersion number | null · Optional

Parent object: body.options

Maximum Solana transaction version the client can sign. Defaults to 0; omission or null uses v0. Set to 1 to allow V1 where enabled. Jito requests always use v0. At execution, pass the maximum to /advanced/stepTransaction and inspect transactionRequest.svmTransactionVersion.

enum: 0, 1

body.options.svmPriorityFeeLevel string · Optional

Parent object: body.options

Priority fee level for Solana Virtual Machine (SVM) transactions.

enum: "NORMAL", "FAST", "ULTRA"

body.options.timing object · Optional

Parent object: body.options

Nested fields and variants
body.options.timing.routeTimingStrategies array · Optional

Parent object: body.options.timing

Timing setting to wait for a certain amount of routes to be generated before choosing the best one. Please check [docs.li.fi](https://docs.li.fi) for more details.
Nested fields and variants

body.options.timing.routeTimingStrategies[] · Array item · object

Nested fields and variants
body.options.timing.routeTimingStrategies[].minWaitTimeMs number · Optional

Parent object: body.options.timing.routeTimingStrategies[]

minimum: 0 · maximum: 15000

body.options.timing.routeTimingStrategies[].reduceEveryMs number · Optional

Parent object: body.options.timing.routeTimingStrategies[]

minimum: 0 · maximum: 15000

body.options.timing.routeTimingStrategies[].startingExpectedResults number · Optional

Parent object: body.options.timing.routeTimingStrategies[]

minimum: 0 · maximum: 100

body.options.timing.routeTimingStrategies[].strategy any · Optional

Parent object: body.options.timing.routeTimingStrategies[]

enum: "minWaitTime"

body.options.timing.swapStepTimingStrategies array · Optional

Parent object: body.options.timing

Timing setting to wait for a certain amount of swap rates. Please check [docs.li.fi](https://docs.li.fi) for more details.
Nested fields and variants

body.options.timing.swapStepTimingStrategies[] · Array item · object

Nested fields and variants
body.options.timing.swapStepTimingStrategies[].minWaitTimeMs number · Optional

Parent object: body.options.timing.swapStepTimingStrategies[]

minimum: 0 · maximum: 15000

body.options.timing.swapStepTimingStrategies[].reduceEveryMs number · Optional

Parent object: body.options.timing.swapStepTimingStrategies[]

minimum: 0 · maximum: 15000

body.options.timing.swapStepTimingStrategies[].startingExpectedResults number · Optional

Parent object: body.options.timing.swapStepTimingStrategies[]

minimum: 0 · maximum: 100

body.options.timing.swapStepTimingStrategies[].strategy any · Optional

Parent object: body.options.timing.swapStepTimingStrategies[]

enum: "minWaitTime"

toAddressJSON request bodybodystringNo

The receiving wallet address

Required markers inside a nested object or variant apply when that object or variant is used.

Response structure

Inferred from examples
  • routesobject[]
    • fromAddressstring
    • fromAmountstring
    • fromAmountUSDstring
    • fromChainIdinteger
    • fromTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsstring[]
      • verificationStatusstring
      • verificationStatusBreakdownobject[]
        • providerstring
        • providerResultstring
        • resultstring
    • idstring
    • toAddressstring
    • toAmountstring
    • toAmountMinstring
    • toAmountUSDstring
    • toChainIdinteger
    • toTokenobject
      • addressstring
      • chainIdinteger
      • coinKeystring
      • decimalsinteger
      • logoURIstring
      • namestring
      • priceUSDstring
      • symbolstring
      • tagsstring[]
      • verificationStatusstring
      • verificationStatusBreakdownobject[]
        • providerstring
        • providerResultstring
        • resultstring
  • unavailableRoutesobject
    • failedobject[]
      • overallPathstring
      • subpathsobject
        • 1:USDC-squid-10:USDCobject[]
    • filteredOutobject[]
      • overallPathstring
      • reasonstring

Agent integration

Copy the resource contract without sharing an API key.

Download MDView API Markdown

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
    A description of a token transfer
    Terminal · cURL
    curl \
      'https://api.openany.si/v1/agent-apis/lifi/v1/advanced/routes' \
      -X POST \
      -H "Authorization: Bearer $OPENANY_API_KEY" \
      -H 'Content-Type: application/json' \
      --data-raw '{
      "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
      "fromAmount": "100000000",
      "fromChainId": 1,
      "fromTokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "options": {
        "slippage": 0.005
      },
      "toChainId": 10,
      "toTokenAddress": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85"
    }'
  3. Check the response

    Sample response · Documented HTTP 200

    Sample response
    {
      "routes": [
        {
          "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
          "fromAmount": "100000000",
          "fromAmountUSD": "100.0235",
          "fromChainId": 1,
          "fromToken": {
            "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "chainId": 1,
            "coinKey": "USDC",
            "decimals": 6,
            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
            "name": "USD Coin",
            "priceUSD": "1.0002350525",
            "symbol": "USDC",
            "tags": [
              "stablecoin"
            ],
            "verificationStatus": "verified",
            "verificationStatusBreakdown": [
              {
                "provider": "hypernative",
                "providerResult": "accept",
                "result": "verified"
              }
            ]
          },
          "id": "f7623b70-2446-47a7-a306-2f67fa59301f",
          "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
          "toAmount": "99739729",
          "toAmountMin": "99739729",
          "toAmountUSD": "99.8232",
          "toChainId": 10,
          "toToken": {
            "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
            "chainId": 10,
            "coinKey": "USDC",
            "decimals": 6,
            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
            "name": "USD Coin",
            "priceUSD": "1.0008373187",
            "symbol": "USDC",
            "tags": [
              "stablecoin"
            ],
            "verificationStatus": "verified",
            "verificationStatusBreakdown": [
              {
                "provider": "hypernative",
                "providerResult": "accept",
                "result": "verified"
              }
            ]
          }
        },
        {
          "fromAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
          "fromAmount": "100000000",
          "fromAmountUSD": "100.0235",
          "fromChainId": 1,
          "fromToken": {
            "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
            "chainId": 1,
            "coinKey": "USDC",
            "decimals": 6,
            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
            "name": "USD Coin",
            "priceUSD": "1.0002350525",
            "symbol": "USDC",
            "tags": [
              "stablecoin"
            ],
            "verificationStatus": "verified",
            "verificationStatusBreakdown": [
              {
                "provider": "hypernative",
                "providerResult": "accept",
                "result": "verified"
              }
            ]
          },
          "id": "b64036bd-0985-441e-9019-ac734c8c517a",
          "toAddress": "0x552008c0f6870c2f77e5cC1d2eb9bdff03e30Ea0",
          "toAmount": "99750000",
          "toAmountMin": "99750000",
          "toAmountUSD": "99.8335",
          "toChainId": 10,
          "toToken": {
            "address": "0x0b2C639c533813f4Aa9D7837CAf62653d097Ff85",
            "chainId": 10,
            "coinKey": "USDC",
            "decimals": 6,
            "logoURI": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png",
            "name": "USD Coin",
            "priceUSD": "1.0008373187",
            "symbol": "USDC",
            "tags": [
              "stablecoin"
            ],
            "verificationStatus": "verified",
            "verificationStatusBreakdown": [
              {
                "provider": "hypernative",
                "providerResult": "accept",
                "result": "verified"
              }
            ]
          }
        }
      ],
      "unavailableRoutes": {
        "failed": [
          {
            "overallPath": "1:USDC~1:USDC-1:USDC-squid-10:USDC",
            "subpaths": {
              "1:USDC-squid-10:USDC": [
                {}
              ]
            }
          }
        ],
        "filteredOut": [
          {
            "overallPath": "1:USDC~1:USDC-1:USDC-near-10:USDC",
            "reason": "The route estimation did not complete before the route timing strategy stopped waiting for results"
          },
          {
            "overallPath": "1:USDC~1:ETH-1:ETH-across-10:ETH-10:ETH~10:USDC",
            "reason": "Across does not send ETH to contracts (receiver: ReceiverAcrossV4)"
          }
        ]
      }
    }

Common questions

Where should I put the transfer request?

Send the object directly as the application/json POST body.

Is the amount a display quantity?

No. fromAmount is a base-unit token quantity.

Can I receive no available routes?

Handle an empty routes list and inspect unavailableRoutes rather than assuming an alternative always exists.

Does an available route prove execution?

No. A route is a planning result, not a signed or completed transaction.

Are route amounts guaranteed indefinitely?

No. Treat estimates as quote-time data and refresh them when preparing a later action.

Are network fees the OpenAny API call price?

No. Gas and transfer fee estimates describe the on-chain operation. Review the selected implementation pricing separately for the OpenAny request.

Use LI.FI Advanced Routes API with your agent

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