Rate Limits

The Suwappu Agent API enforces rate limits using a sliding window mechanism. Limits vary by tier and are applied per API key.

Tiers

Tier
Requests per Minute
Description

Free

30

Default tier for newly registered agents

Agent

100

For active trading agents

Pro

500

For high-frequency and production workloads

All limits use a 1-minute sliding window. The window tracks requests over the last 60 seconds, not fixed calendar minutes.

Response Headers

Every API response includes rate limit headers so you can track your usage in real time:

Header
Description
Example

X-RateLimit-Limit

Maximum requests allowed per minute for your tier

30

X-RateLimit-Remaining

Requests remaining in the current window

27

X-RateLimit-Reset

Unix timestamp (seconds) when the window resets

1705312260

Example response headers:

HTTP/1.1 200 OK
Content-Type: application/json
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 27
X-RateLimit-Reset: 1705312260

Handling 429 Too Many Requests

When you exceed your rate limit, the API returns a 429 status with a Retry-After header indicating how many seconds to wait before retrying.

Response:

Public Endpoints

Public endpoints (POST /register, GET /chains, GET /openapi) are not subject to per-key rate limiting.

Code Examples

Python

TypeScript

Best Practices

  • Monitor headers proactively. Check X-RateLimit-Remaining on every response and throttle before hitting zero.

  • Always respect Retry-After. Do not retry immediately — the server tells you exactly how long to wait.

  • Use exponential backoff as a fallback. If Retry-After is absent for any reason, back off exponentially (e.g., 1s, 2s, 4s).

  • Batch where possible. Reduce request count by batching operations rather than making many individual calls.

  • Upgrade your tier if you consistently hit rate limits in production.

Last updated