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:

{
  "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 or [email protected].

  3. Specify your expected traffic volume and use case.


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:

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

The rate limit applies per wallet address. Different wallet addresses can request routes concurrently without triggering the limit.


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.

Last updated