> 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/api/rate-limiting.md).

# Rate Limiting

The Squid API enforces rate limits to ensure fair usage and protect infrastructure. This page documents the rate limiting behavior you may encounter when integrating.

***

## Authentication Required

All API requests must include a valid `x-integrator-id` header. Requests without this header will receive:

```json
{
  "message": "x-integrator-id header is missing",
  "type": "UNAUTHORIZED"
}
```

***

## Request Rate (RPS)

Every integrator ID is issued with a **requests-per-second (RPS)** limit that controls how many API calls you can make per second across all endpoints.

| Stage                     | Default RPS | Notes                                                        |
| ------------------------- | ----------- | ------------------------------------------------------------ |
| **Testing / Development** | 1 RPS       | Issued with every new integrator ID                          |
| **Production**            | 10 RPS      | Request an upgrade from the Squid team when ready to go live |
| **High Volume**           | Custom      | Contact the team for higher limits based on your usage needs |

### How to request an RPS increase

1. Ensure your integration is tested and production-ready.
2. Contact the Squid team via [Discord](https://discord.gg/squidrouter) or <support@squidrouter.exchange>.
3. Specify your expected traffic volume and use case.

{% hint style="warning" %}
If you exceed your RPS limit, requests will be throttled. Make sure to request an upgrade **before** launching to production to avoid interruptions for your users.
{% endhint %}

***

## Wallet-Based Quote Rate Limit

When requesting routes with `quoteOnly: false` (the default), the API enforces a per-wallet rate limit to prevent duplicate transaction data from being generated.

### Why this limit exists

When `quoteOnly` is `false`, the API generates full transaction call data (including signed solver quotes for Squid Intents routes). Submitting identical requests for the same wallet in rapid succession would produce the same call data, wasting compute and potentially causing transaction conflicts.

### Error Response

If you exceed the rate limit, the API returns:

```json
{
  "error": "Too many quote requests for this address",
  "retryAfter": 1
}
```

| Field        | Type     | Description                               |
| ------------ | -------- | ----------------------------------------- |
| `error`      | `string` | Human-readable error message              |
| `retryAfter` | `number` | Number of seconds to wait before retrying |

### How to handle this

1. **Wait and retry** — respect the `retryAfter` value before sending another request for the same wallet.
2. **Use `quoteOnly: true` for price discovery** — if you only need a price estimate (e.g., for display purposes), set `quoteOnly: true` in your route request. This returns a quote without generating transaction data and is not subject to the same rate limit.
3. **Cache quotes** — if your UI needs to refresh prices, cache the previous quote and only request a new one after a reasonable interval.

### Example: Using quoteOnly for price display

```typescript
// For UI price display — not rate limited
const quoteParams = {
  fromAddress: userAddress,
  fromChain: "56",
  fromToken: "0x55d398326f99059fF775485246999027B3197955",
  fromAmount: "1000000000000000",
  toChain: "42161",
  toToken: "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
  toAddress: userAddress,
  quoteOnly: true,  // Only returns pricing, no tx data
};

// When user clicks "Swap" — request full route with tx data
const execParams = {
  ...quoteParams,
  quoteOnly: false,  // Generates transaction data (rate limited per wallet)
};
```

{% hint style="info" %}
The rate limit applies **per wallet address**. Different wallet addresses can request routes concurrently without triggering the limit.
{% endhint %}

***

## General Best Practices

* **Separate quote from execution** — use `quoteOnly: true` for displaying prices and only request full transaction data when the user initiates a swap.


---

# 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/api/rate-limiting.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.
