> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# API Parameters

> How Composer uses the standard LI.FI API parameters, including tool identification, slippage, and route filtering.

Composer activates automatically when `toToken` is set to a [supported protocol](/composer/protocols-and-chains) 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.

| Parameter        | Type      | Required | Description                                                                                            |
| ---------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------ |
| `fromChain`      | number    | Yes      | Source chain ID (e.g., `1` for Ethereum, `8453` for Base)                                              |
| `toChain`        | number    | Yes      | Destination chain ID. Same as `fromChain` for same-chain deposits.                                     |
| `fromToken`      | string    | Yes      | Source token address. Use `0x0000000000000000000000000000000000000000` for native tokens.              |
| `toToken`        | string    | Yes      | **Vault/staking/deposit token address.** This is what triggers Composer.                               |
| `fromAmount`     | string    | Yes      | Amount in the `fromToken`'s smallest unit (e.g., `1000000` for 1 USDC with 6 decimals).                |
| `fromAddress`    | string    | Yes      | Sender's wallet address.                                                                               |
| `toAddress`      | string    | Yes      | Recipient's wallet address. Usually the same as `fromAddress`. Can differ for deposit-on-behalf flows. |
| `slippage`       | number    | No       | Maximum acceptable price difference as a decimal. `0.005` = 0.5%. Defaults to `0.005`.                 |
| `integrator`     | string    | No       | Identifies your application in analytics and on-chain events. Max 23 characters.                       |
| `allowBridges`   | string\[] | No       | Restrict routes to specific bridges (e.g., `["stargate","across"]`). Retrieved from `GET /v1/tools`.   |
| `denyBridges`    | string\[] | No       | Exclude specific bridges from routing.                                                                 |
| `allowExchanges` | string\[] | No       | Restrict routes to specific DEX aggregators. Retrieved from `GET /v1/tools`.                           |
| `denyExchanges`  | string\[] | No       | Exclude specific DEX aggregators from routing.                                                         |
| `order`          | string    | No       | Route 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:

```ts theme={"system"}
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:

```ts theme={"system"}
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:

<CardGroup cols={2}>
  <Card title="GET /quote" icon="bolt" href="/api-reference/get-a-quote-for-a-token-transfer">
    Single-step quote endpoint with all parameters
  </Card>

  <Card title="POST /advanced/routes" icon="route" href="/api-reference/advanced/get-a-set-of-routes-for-a-request-that-describes-a-transfer-of-tokens">
    Multi-route endpoint with all parameters
  </Card>

  <Card title="Quote vs Route" icon="arrows-split-up-and-left" href="/introduction/user-flows-and-examples/difference-between-quote-and-route">
    When to use each endpoint
  </Card>

  <Card title="API Overview" icon="key" href="/api-reference/introduction">
    Base URL, authentication, and rate limits
  </Card>
</CardGroup>

***

## Related Pages

<CardGroup cols={2}>
  <Card title="API Integration Guide" icon="code" href="/composer/lifi-api/guides/api-integration">
    Step-by-step Composer integration with response schema
  </Card>

  <Card title="Withdrawals Guide" icon="clock" href="/composer/lifi-api/guides/withdrawals">
    Implement withdraw routes with the same API surface
  </Card>

  <Card title="Error Handling" icon="triangle-exclamation" href="/composer/lifi-api/reference/error-handling">
    Handle Composer-specific errors
  </Card>

  <Card title="Supported Protocols" icon="list" href="/composer/protocols-and-chains">
    Full list of supported vault/staking tokens with example addresses
  </Card>
</CardGroup>
