# Request Quote

Get routing quotes for swaps. The public response is intentionally slim: `quoteId`, `expiresAtMs`, and route summaries.

For same-chain routes, `provider` is a convenience alias when the route resolves to one public provider label. For cross-chain or other multi-step routes, prefer `providers`, `bridgeProvider`, and `stepCount`.

If no viable route exists for the requested pair, the endpoint still returns `200` with `routes: []`.

**Endpoint:** `POST /api/v1/quote`\
**Auth:** Required (`Authorization: Bearer YOUR_API_KEY`)

## Request body

| Field                  | Type    | Required | Description                     | Example                    |
| ---------------------- | ------- | -------- | ------------------------------- | -------------------------- |
| `fromChain`            | string  | Yes      | Source chain                    | `solana`                   |
| `toChain`              | string  | Yes      | Destination chain               | `avax`                     |
| `tokenIn`              | string  | Yes      | Input token symbol              | `SOL`                      |
| `tokenOut`             | string  | Yes      | Output token symbol             | `WETH`                     |
| `network`              | string  | No       | `mainnet` or `testnet`          | `mainnet`                  |
| `tokenRefFromOverride` | string  | No       | Canonical input token override  | `eip155:42161:erc20:0x...` |
| `tokenRefToOverride`   | string  | No       | Canonical output token override | `eip155:43114:erc20:0x...` |
| `amount`               | string  | Yes      | Human-readable amount           | `100.00`                   |
| `slippageBps`          | integer | No       | Slippage in basis points        | `75`                       |
| `recipient`            | string  | No       | Destination wallet address      | `0x1234...`                |

## Example

```bash
curl -X POST 'https://api.gateway.zert.com/api/v1/quote' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "fromChain": "solana",
    "toChain": "avax",
    "tokenIn": "SOL",
    "tokenOut": "WETH",
    "network": "mainnet",
    "amount": "100.00",
    "slippageBps": 75,
    "recipient": "0x1234567890123456789012345678901234567890"
  }'
```

### Example response

```json
{
  "data": {
    "quoteId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "expiresAtMs": 1776977796667,
    "routes": [
      {
        "routeId": "route_01hzy3m7v0xj7x4mqs79b0z9st",
        "providers": ["raydium", "circle-cctp", "traderjoe"],
        "bridgeProvider": "circle-cctp",
        "family": "cctp",
        "stepCount": 3,
        "expectedAmountOut": "4.17000742",
        "estimatedDurationSeconds": 180
      }
    ]
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2026-04-23T20:56:04.937Z"
  }
}
```

## Responses

| Code | Description                                                         |
| ---- | ------------------------------------------------------------------- |
| 200  | Quote completed                                                     |
| 400  | Invalid request                                                     |
| 401  | Unauthorized                                                        |
| 502  | Quote-service unavailable or returned a non-client upstream failure |

{% embed url="<https://api.gateway.zert.com/docs>" %}
Zert API — Quote
{% endembed %}


---

# Agent Instructions: 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.zert.com/api-reference/swap/request-quote.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.
