Skip to main content
Composer activates automatically when toToken is set to a supported protocol token address. No additional parameters are needed beyond the standard LI.FI quote parameters.

How toToken Triggers Composer

When toToken corresponds to a supported vault/staking/deposit token, LI.FI’s routing engine automatically:
  1. Identifies this as a Composer route
  2. Finds the optimal path (swap, bridge, or both) to acquire the underlying asset
  3. Compiles the Composer instructions (eDSL → bytecode)
  4. Simulates the full execution path
  5. Returns a transactionRequest ready to sign

Composer-Relevant Parameters

These parameters are part of the standard GET /quote and POST /advanced/routes endpoints. They are not Composer-specific, but are particularly relevant when building Composer integrations.
ParameterTypeRequiredDescription
fromChainnumberYesSource chain ID (e.g., 1 for Ethereum, 8453 for Base)
toChainnumberYesDestination chain ID. Same as fromChain for same-chain deposits.
fromTokenstringYesSource token address. Use 0x0000000000000000000000000000000000000000 for native tokens.
toTokenstringYesVault/staking/deposit token address. This is what triggers Composer.
fromAmountstringYesAmount in the fromToken’s smallest unit (e.g., 1000000 for 1 USDC with 6 decimals).
fromAddressstringYesSender’s wallet address.
toAddressstringYesRecipient’s wallet address. Usually the same as fromAddress. Can differ for deposit-on-behalf flows.
slippagenumberNoMaximum acceptable price difference as a decimal. 0.005 = 0.5%. Defaults to 0.005.
integratorstringNoIdentifies your application in analytics and on-chain events. Max 23 characters.
allowBridgesstring[]NoRestrict routes to specific bridges (e.g., ["stargate","across"]). Retrieved from GET /v1/tools.
denyBridgesstring[]NoExclude specific bridges from routing.
allowExchangesstring[]NoRestrict routes to specific DEX aggregators. Retrieved from GET /v1/tools.
denyExchangesstring[]NoExclude specific DEX aggregators from routing.
orderstringNoRoute preference: "FASTEST" or "CHEAPEST".

Identifying Composer Routes

The Composer tool name

Composer’s tool identifier is "composer". This string appears in:
  • quote.tool: top-level tool used for the route
  • quote.toolDetails.key: same value, with additional name and logoURI
  • quote.includedSteps[].tool: tool used in each step of the route
Composer activates automatically when toToken matches a supported protocol token. You cannot filter for or against Composer routes at the request level. It is determined by the toToken address.

Detecting Composer routes in your application

Use the tool field in the response to build conditional UI:
const { data: quote } = await axios.get('https://li.quest/v1/quote', { params });

if (quote.tool === 'composer') {
  // Composer route: show deposit/staking UI
  showComposerUI(quote);
} else {
  // Standard swap or bridge: show swap UI
  showSwapUI(quote);
}

Controlling bridges and exchanges

You can control which bridges or DEX aggregators are used within a Composer route using the standard bridge/exchange filter parameters:
const { data: quote } = await axios.get('https://li.quest/v1/quote', {
  params: {
    ...params,
    allowBridges: ['stargate', 'across'],  // Only use these bridges for cross-chain
    order: 'FASTEST',                       // Prefer speed over cost
  },
});

Full Parameter Reference

For complete endpoint documentation, parameter lists, and authentication details, see:

GET /quote

Single-step quote endpoint with all parameters

POST /advanced/routes

Multi-route endpoint with all parameters

Quote vs Route

When to use each endpoint

API Overview

Base URL, authentication, and rate limits

API Integration Guide

Step-by-step Composer integration with response schema

Withdrawals Guide

Implement withdraw routes with the same API surface

Error Handling

Handle Composer-specific errors

Supported Protocols

Full list of supported vault/staking tokens with example addresses