Rate Limits
High-throughput APIs built for autonomous agents. Purple Flea enforces per-minute and per-day limits by tier, with burst headroom and sensible per-endpoint caps for integrity-sensitive operations.
Rate Limit Tiers
All new registrations start on the Free tier. Limits apply per API key across all endpoints unless otherwise noted.
| Tier | Requests / min | Requests / day | Notes |
|---|---|---|---|
| Free | 100 | 10,000 | Default for all new API keys |
| Pro | 1,000 | 1,000,000 | Contact hello@purpleflea.com |
| Enterprise | Unlimited | Unlimited | SLA available, dedicated infrastructure |
Counting: Every HTTP request counts against your limit regardless of outcome — including 400, 401, and 404 responses. Failed requests still consume quota.
Per-Endpoint Limits
Some endpoints carry additional per-minute caps independent of your tier limit. These apply on top of the tier ceiling — whichever limit is lower takes precedence.
| Endpoint | Hard Cap (req/min) | Reason |
|---|---|---|
Casino /play |
60 | Game integrity — one bet per second max |
Trading /positions |
300 | Order book access, risk management polling |
Wallet /swap |
120 | DEX aggregator upstream limits |
All /register endpoints |
10 | Anti-spam, account creation throttle |
/register endpoints are IP-limited, not key-limited. The 10 req/min cap applies per originating IP address, even if the requests use different API keys. This is intentional anti-abuse behavior that cannot be bypassed with Pro or Enterprise tiers.
Burst Allowance
Purple Flea allows short traffic spikes using a token bucket algorithm. You may exceed your per-minute limit by up to 3x for a 10-second burst window before requests are rate-limited.
| Tier | Sustained (req/min) | Burst Peak (req/10s) | Burst Multiplier |
|---|---|---|---|
| Free | 100 | 50 | 3x for 10s |
| Pro | 1,000 | 500 | 3x for 10s |
| Enterprise | Unlimited | Unlimited | — |
After a burst window, the bucket refills at the sustained rate. Burst is useful for initialization sequences (fetching market state on startup) but should not be relied upon for steady-state operation.
Rate Limit Headers
Every API response includes rate limit state in the following headers. Agents should read these on every response to avoid hitting limits.
| Header | Type | Description |
|---|---|---|
| X-RateLimit-Limit | integer | Maximum requests allowed in the current window |
| X-RateLimit-Remaining | integer | Requests remaining in the current window |
| X-RateLimit-Reset | unix timestamp | UTC timestamp when the current window resets |
| Retry-After | integer | Seconds to wait before retrying (only on 429 responses) |
429 Response Format
When a rate limit is exceeded, the API returns HTTP 429 with a JSON body describing the limit that was hit and when to retry.
Always use Retry-After. Do not hardcode sleep durations. The Retry-After header gives the exact number of seconds until your window resets. Use it directly in your backoff logic.
Best Practices for Agents
Autonomous agents that run continuously need to be rate-limit-aware by design, not as an afterthought. The following patterns keep agents within limits without sacrificing responsiveness.
Retry-After seconds before retrying. If you receive consecutive 429s, multiply the wait by 2 each time (capped at 60s). Do not retry immediately.GET /v1/markets at most every 5 seconds. Market data changes rarely enough that sub-second polling wastes quota with no benefit. Store the last response in memory and serve it locally between polls.limit query parameters to retrieve up to 100 records at once.X-RateLimit-Remaining drops below 10, introduce a short sleep before the next request rather than waiting for a 429. Pre-emptive throttling prevents errors entirely.Python: Rate-Limit-Aware Request Handler
Drop-in wrapper that handles 429 responses with exponential backoff, reads Retry-After, and pre-emptively slows down when remaining quota is low.
Upgrading Your Tier
The Free tier is sufficient for development, testing, and low-frequency agents. For agents running at production scale, Pro or Enterprise tiers remove practical limits.
| Tier | How to Activate | Turnaround |
|---|---|---|
| Free | Default on registration — no action required | Instant |
| Pro | Email hello@purpleflea.com with your API key | Within 24 hours |
| Enterprise | Email hello@purpleflea.com with your use case and expected volume | Within 48 hours |
Enterprise SLA includes: Dedicated rate limit pools, priority support, custom per-endpoint caps, and uptime SLA commitments. Suitable for agent fleets generating consistent high-volume traffic across all APIs.
To upgrade, email hello@purpleflea.com with your API key and a brief description of your agent's use case. Tier upgrades are applied to the API key within the stated turnaround time. No payment processor or dashboard is required — upgrades are handled manually.