# Request a Quote

> Request a quote for a swap from Zert's backend.

### `request`

Fetches a quote for a swap given source chain, destination chain, tokens, amount, slippage, and recipient.

**Parameters**

* `body` (QuoteRequest, required): Quote request.
  * `fromChain` (string): Source chain (e.g. `arbitrum`).
  * `toChain` (string): Destination chain.
  * `tokenIn` (string): Input token symbol or ref (e.g. `USDC`).
  * `tokenOut` (string): Output token symbol or ref (e.g. `USDT`).
  * `network` (string): Network (e.g. `mainnet`).
  * `amount` (string): Amount as string (e.g. `"100.00"`).
  * `slippageBps` (number): Slippage tolerance in basis points (e.g. `75` = 0.75%).
  * `recipient` (string): Recipient address.

**Returns**

A Promise that resolves to `QuoteResponse`.

* `data.quoteId` (string): Quote identifier.
* `data.expiresAtMs` (number): Quote expiry in milliseconds.
* `data.routes` (QuoteRoute\[]): Route options (`routeId`, `provider(s)`, `expectedAmountOut`, etc.).
* `meta.requestId` (string): Request identifier.
* `meta.timestamp` (string): Response timestamp.

```typescript
import { RoutingEngineSDK } from 'routing-engine-sdk';

const sdk = new RoutingEngineSDK({
  api: { apiKey: 'your-api-key' },
});

try {
  const response = await sdk.quote.request({
    fromChain: 'arbitrum',
    toChain: 'avax',
    tokenIn: 'TBTC',
    tokenOut: 'WETH',
    network: 'mainnet',
    amount: '100.00',
    slippageBps: 75,
    recipient: '0x1234567890123456789012345678901234567890',
  });
  console.log('Quote ID:', response.data.quoteId);
  console.log('First route:', response.data.routes[0]?.routeId);
} catch (error) {
  console.error(error);
}
```


---

# 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/routing-engine-sdk/request-a-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.
