> For the complete documentation index, see [llms.txt](https://docs.nabla.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nabla.fi/developers/swap-api/quote.md).

# Quote

Quote endpoint: `/chains/{chainId}/quote`

## Query

### Description of query parameters

All parameters with asterisks `*` are **REQUIRED**.

<table><thead><tr><th width="159.69921875">Parameter name</th><th width="120.2578125">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>chainId</code>*</td><td>integer</td><td>Network chain ID of the target blockchain.<br>Example: <code>42161</code> (Arbitrum).</td></tr><tr><td><code>tokenIn</code>*</td><td>string</td><td>Contract address of the ERC20 token to <strong>swap from</strong>.<br>Example: <code>0xaf88d065e77c8cC2239327C5EDb3A432268e5831</code> (USDC on Arbitrum).</td></tr><tr><td><code>tokenOut</code>*</td><td>string</td><td>Contract address of the ERC20 token to <strong>swap to</strong>.<br>Example: <code>0x82aF49447D8a07e3bd95BD0d56f35241523fBab1</code> (WETH on Arbitrum).</td></tr><tr><td><code>amountIn</code>*</td><td>integer</td><td>Amount of <code>tokenIn</code> to sell, specified in minimal divisible units.<br>Examples:<br><code>1.00 USDC</code> → <code>1000000</code><br><code>0.5 WETH</code> → <code>500000000000000000</code></td></tr></tbody></table>

### Example request

#### **HTTP GET**

```bash
GET /chains/42161/quote?tokenIn=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&tokenOut=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1&amountIn=500000000
```

#### curl

```bash
curl -X GET "https://swap-api.nabla.fi/chains/42161/quote?tokenIn=0xaf88d065e77c8cC2239327C5EDb3A432268e5831&tokenOut=0x82aF49447D8a07e3bd95BD0d56f35241523fBab1&amountIn=500000000" \
  -H "accept: application/json"
```

## Response

### Response fields

<table><thead><tr><th width="189.71875">Field</th><th width="150.49609375">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>amountIn</code></td><td>integer</td><td>Amount of input tokens to sell (in minimal divisible units).</td></tr><tr><td><code>amountOut</code></td><td>integer</td><td>Estimated amount of output tokens to receive (in minimal divisible units).</td></tr><tr><td><code>routerPath</code></td><td>array of strings</td><td>Ordered list of router contract addresses used in the swap route.</td></tr><tr><td><code>tokenPath</code></td><td>array of strings</td><td>Ordered list of token contract addresses representing the swap path.</td></tr><tr><td><code>estimatedSlippage</code></td><td>float</td><td>Estimated slippage for this swap, expressed in percent (e.g. <code>0.5</code> = 0.5%).</td></tr></tbody></table>

### Example response

```json
{
  "amountIn": 500000000,
  "amountOut": 126738061188613643,
  "routerPath": [
    "0x7bcFc8b8ff61456ad7C5E2be8517D01df006d18d"
  ],
  "tokenPath": [
    "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1"
  ],
  "estimatedSlippage": 0.0302
}
```

## Notes

* This endpoint **does not execute** swaps — it only provides **pricing and routing information**.
* To perform the actual swap, use the `/swap` endpoint with the parameters returned here.
* Prices and slippage estimates may change rapidly depending on on-chain liquidity conditions.


---

# 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, and the optional `goal` query parameter:

```
GET https://docs.nabla.fi/developers/swap-api/quote.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
