> For the complete documentation index, see [llms.txt](https://docs.squidrouter.exchange/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.squidrouter.exchange/api-and-sdk-integration/key-concepts/route-response-schema.md).

# Route Response Schema

When you call `POST https://v2.api.squidrouter.exchange/v2/route`, the API returns a route response containing the optimal path, estimated output, and (if `quoteOnly` is `false`) the transaction data needed for execution.

## Top-Level Structure

```json
{
  "route": {
    "estimate": { ... },           // Route pricing, actions, fees, and gas costs
    "transactionRequest": { ... }, // Transaction data for on-chain execution (empty when quoteOnly: true)
    "params": { ... },             // Echo of your original request parameters
    "quoteId": "string"            // Unique quote identifier — required for Squid Intents status tracking
  }
}
```

{% hint style="danger" %}
**Important:** The `quoteId` field is required for all Squid Intents status tracking. If `quoteId` is not included in status calls, the transaction will be **refunded** to the source chain.
{% endhint %}

***

## `route.estimate`

The estimate object contains all pricing information, the ordered list of actions, and cost breakdowns.

| Field                    | Type        | Description                                                        |
| ------------------------ | ----------- | ------------------------------------------------------------------ |
| `actions`                | `Action[]`  | Ordered array of steps the route will take (swaps, bridges, wraps) |
| `fromAmount`             | `string`    | Input amount in the token's smallest unit                          |
| `toAmount`               | `string`    | Estimated output amount in the token's smallest unit               |
| `toAmountMin`            | `string`    | Minimum output after accounting for slippage                       |
| `exchangeRate`           | `string`    | Overall exchange rate between source and destination tokens        |
| `aggregatePriceImpact`   | `string`    | Total price impact across all steps (e.g. `"0.0"`, `"-0.02"`)      |
| `fromAmountUSD`          | `string`    | USD value of the input amount                                      |
| `toAmountUSD`            | `string`    | USD value of the estimated output                                  |
| `toAmountMinUSD`         | `string`    | USD value of the minimum output                                    |
| `aggregateSlippage`      | `number`    | Total slippage percentage across the route                         |
| `fromToken`              | `Token`     | Full source token object                                           |
| `toToken`                | `Token`     | Full destination token object                                      |
| `feeCosts`               | `FeeCost[]` | Breakdown of fees (bridging fees, boost fees)                      |
| `gasCosts`               | `GasCost[]` | Breakdown of gas costs                                             |
| `estimatedRouteDuration` | `number`    | Estimated total time in seconds                                    |

***

## `Action` Object

Each action represents one step in the route. Actions are executed in order, with `stage: 0` for source chain actions and `stage: 1` for destination chain actions.

| Field               | Type     | Description                                                         |
| ------------------- | -------- | ------------------------------------------------------------------- |
| `type`              | `string` | Type of action: `"bridge"`, `"swap"`, or `"wrap"`                   |
| `chainType`         | `string` | Chain ecosystem (e.g. `"evm"`, `"cosmos"`)                          |
| `data`              | `object` | Provider-specific data (varies by action type — see below)          |
| `fromChain`         | `string` | Chain ID where this action starts                                   |
| `toChain`           | `string` | Chain ID where this action ends                                     |
| `fromToken`         | `Token`  | Input token for this step                                           |
| `toToken`           | `Token`  | Output token for this step                                          |
| `fromAmount`        | `string` | Input amount for this step                                          |
| `toAmount`          | `string` | Estimated output for this step                                      |
| `toAmountMin`       | `string` | Minimum output after slippage for this step                         |
| `exchangeRate`      | `string` | Exchange rate for this step                                         |
| `priceImpact`       | `string` | Price impact for this step                                          |
| `stage`             | `number` | `0` = source chain, `1` = destination chain                         |
| `provider`          | `string` | Provider name (e.g. `"Axelar"`, `"Uniswap V3"`, `"Pancakeswap V3"`) |
| `logoURI`           | `string` | Provider logo URL                                                   |
| `description`       | `string` | Human-readable description (e.g. `"Swap USDC to WETH"`)             |
| `estimatedDuration` | `number` | (Bridges only) Estimated duration in seconds                        |

### Action Type: `bridge`

Cross-chain bridge step. The `data` object contains:

```json
{
  "name": "Axelar",
  "provider": "Axelar",
  "type": "axelar-gmp",
  "logoURI": "https://..."
}
```

### Action Type: `swap`

DEX swap step. The `data` object contains:

```json
{
  "address": "0x...",           // Pool or pair address
  "chainId": "42161",
  "coinAddresses": ["0x...", "0x..."],
  "dex": "Uniswap V3",         // DEX name
  "path": ["0x...", "0x..."],   // Token swap path
  "slippage": 0.0105,
  "aggregateSlippage": 0.0105,
  "target": "0x..."            // Router contract address
}
```

### Action Type: `wrap`

Native token wrap or unwrap step. The `data` object contains:

```json
{
  "address": "0x...",           // Wrapped token contract
  "type": "WrappedNative",
  "path": ["0x...", "0x..."],
  "direction": "wrap",          // "wrap" or "unwrap"
  "target": "0x..."
}
```

***

## `route.transactionRequest`

When `quoteOnly: false`, this object contains the transaction data needed for on-chain execution. The structure depends on the [Transaction Type](/api-and-sdk-integration/key-concepts/transaction-types.md).

For EVM `ON_CHAIN_EXECUTION` transactions:

| Field                  | Type     | Description                                          |
| ---------------------- | -------- | ---------------------------------------------------- |
| `routeType`            | `string` | Route type (e.g. `"CALL_BRIDGE_CALL"`, `"EVM_ONLY"`) |
| `target`               | `string` | Contract address to call                             |
| `data`                 | `string` | Encoded calldata                                     |
| `value`                | `string` | Native token value to send (wei)                     |
| `gasLimit`             | `string` | Recommended gas limit                                |
| `gasPrice`             | `string` | Current gas price                                    |
| `maxFeePerGas`         | `string` | EIP-1559 max fee                                     |
| `maxPriorityFeePerGas` | `string` | EIP-1559 priority fee                                |

For `DEPOSIT_ADDRESS_WITH_SIGNATURE` transactions (Hedera):

| Field               | Type     | Description                              |
| ------------------- | -------- | ---------------------------------------- |
| `routeType`         | `string` | `"DEPOSIT_ADDRESS_WITH_SIGNATURE"`       |
| `depositAddress`    | `string` | Address to send funds to                 |
| `signatureRequired` | `object` | Contains `orderHash` that must be signed |

{% hint style="info" %}
When `quoteOnly: true`, `transactionRequest` is an empty object `{}`. This is useful for showing users estimated outputs before they commit to executing the swap.
{% endhint %}

***

## `route.params`

An echo of your original request parameters, returned for reference:

```json
{
  "fromChain": "1",
  "toChain": "42161",
  "fromToken": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
  "toToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  "fromAmount": "1000000",
  "fromAddress": "0x...",
  "toAddress": "0x...",
  "slippage": 1,
  "quoteOnly": true
}
```

***

## `FeeCost` Object

| Field           | Type     | Description                                         |
| --------------- | -------- | --------------------------------------------------- |
| `name`          | `string` | Fee name (e.g. `"Gas receiver fee"`, `"Boost fee"`) |
| `description`   | `string` | Human-readable description                          |
| `amount`        | `string` | Fee amount in token's smallest unit                 |
| `amountUsd`     | `string` | Fee amount in USD                                   |
| `token`         | `Token`  | Token used for the fee                              |
| `gasLimit`      | `string` | Gas limit (if applicable)                           |
| `gasMultiplier` | `number` | Gas multiplier (if applicable)                      |

***

## `GasCost` Object

| Field       | Type     | Description                          |
| ----------- | -------- | ------------------------------------ |
| `type`      | `string` | Gas cost type (e.g. `"executeCall"`) |
| `token`     | `Token`  | Token used for gas                   |
| `amount`    | `string` | Gas cost in token's smallest unit    |
| `gasLimit`  | `string` | Gas limit                            |
| `amountUsd` | `string` | Gas cost in USD                      |

***

## `Token` Object

Token objects appear throughout the response (in `estimate`, `actions`, `feeCosts`, etc.):

| Field         | Type     | Description                  |
| ------------- | -------- | ---------------------------- |
| `address`     | `string` | Token contract address       |
| `chainId`     | `string` | Chain ID                     |
| `symbol`      | `string` | Token symbol (e.g. `"USDC"`) |
| `name`        | `string` | Full token name              |
| `decimals`    | `number` | Token decimal places         |
| `logoURI`     | `string` | Token logo URL               |
| `usdPrice`    | `number` | Current USD price            |
| `coingeckoId` | `string` | CoinGecko identifier         |
| `type`        | `string` | Chain type (e.g. `"evm"`)    |

***

## Example: Native Token Swap

An ETH swap from Arbitrum → Base produces a multi-step route:

1. **Wrap** (stage 0): Wrap ETH → WETH on Arbitrum
2. **Swap** (stage 0): Swap WETH → USDC via Uniswap V3
3. **Swap** (stage 0): Swap USDC → USDC.axl via Pancakeswap V3
4. **Bridge** (stage 0→1): Bridge USDC.axl via Axelar to Base
5. **Swap** (stage 1): Swap USDC.axl → USDC on Base
6. **Swap** (stage 1): Swap USDC → WETH via Uniswap V3
7. **Unwrap** (stage 1): Unwrap WETH → ETH on Base


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.squidrouter.exchange/api-and-sdk-integration/key-concepts/route-response-schema.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
