Why Rate Limits Exist
API rate limits protect servers from being overwhelmed and ensure fair access for all users. Every prediction market API has them:
- Kalshi: ~10 requests/second for authenticated endpoints
- Polymarket: Varies by endpoint, generally 60 requests/minute
- SimpleFunctions: Tiered by plan (free: 100/min, pro: 1000/min)
What Happens When You Hit a Limit
When you exceed the rate limit, the API returns a 429 (Too Many Requests) response with a Retry-After header telling you how long to wait.
How SimpleFunctions Handles Rate Limits
The CLI and API client handle rate limiting automatically:
- Request queuing: If you fire 20 requests, the client queues them and sends at the maximum allowed rate
- Backoff: On a 429 response, the client waits the specified duration before retrying
- Batching: Multiple small requests are combined into batch requests to reduce total request count
- Caching: Recent responses are cached to avoid redundant requests
Rate Limits and the Heartbeat
The heartbeat engine is designed to operate well within rate limits. A 30-minute heartbeat cycle uses approximately 5-10 API calls per thesis, well within any rate limit tier.
Monitoring Your Usage
sf rate-limits
Shows your current rate limit usage, remaining quota, and reset time for each API.