Overview
Rate limiting protects our API infrastructure by controlling how many requests you can make within specific time periods. Think of it like having three different speed limits on the same road - you need to respect all of them to keep moving smoothly. Our system uses three-tier rate limiting to ensure fair usage and optimal performance for all developers:Per-Second Limits
Prevents burst traffic spikes
Per-Minute Limits
Controls sustained request rates
Daily Limits
Manages overall daily usage
How Rate Limiting Works
Three-Tier Protection
Every API request must pass through all three rate limiting tiers:- Second-level: Allows quick bursts of requests (typically 5-50 per second)
- Minute-level: Permits sustained usage (typically 100-3000 per minute)
- Daily-level: Sets overall usage bounds (typically 10,000-100,000 per day)
Your specific limits depend on your TitanX plan. Use the
/api/public/quota endpoint to see your current limits.Fixed Time Windows
Our rate limits use fixed time windows that reset at exact intervals:- Per-Second
- Per-Minute
- Daily
Resets every second at the exact second boundary.Example: If it’s currently
14:23:45.750, your second quota will reset at 14:23:46.000How Quotas Are Consumed
Each successful API request consumes 1 quota from all three tiers simultaneously. Failed requests (4xx/5xx errors) still consume quota to prevent abuse.If ANY tier is exceeded, your request will be blocked with a
429 Too Many Requests response, even if the other tiers have remaining quota.Rate Limit Headers
Every API response includes detailed information about your current rate limit status through HTTP headers:Complete Headers Reference
| Header | Description | Example |
|---|---|---|
X-RateLimit-Limit-Second | Maximum requests allowed per second | 10 |
X-RateLimit-Remaining-Second | Remaining requests this second | 7 |
X-RateLimit-Reset-Second | When second quota resets (Unix timestamp) | 1704110401 |
X-RateLimit-Limit-Minute | Maximum requests allowed per minute | 300 |
X-RateLimit-Remaining-Minute | Remaining requests this minute | 287 |
X-RateLimit-Reset-Minute | When minute quota resets (Unix timestamp) | 1704110460 |
X-RateLimit-Limit-Day | Maximum requests allowed per day | 50000 |
X-RateLimit-Remaining-Day | Remaining requests today | 49713 |
X-RateLimit-Reset-Day | When daily quota resets (Unix timestamp) | 1704153600 |
Special Headers
When you’re rate limited, additional headers help you retry effectively:| Header | Description | Example |
|---|---|---|
Retry-After | Seconds to wait before retrying | 1 |
Convert Unix timestamps to readable dates:
new Date(timestamp * 1000) in JavaScriptExample Response Headers
Checking Your Quota
Use the/api/public/quota endpoint to check your current limits without consuming quota:
Handling Rate Limits
When You Hit a Limit
When any rate limit is exceeded, you’ll receive a429 Too Many Requests response:
Best Practices for Retries
1
Check the Retry-After Header
Always respect the
Retry-After header value before making another request.2
Implement Exponential Backoff
If you don’t receive a
Retry-After header, use exponential backoff starting with 1 second.3
Monitor All Tiers
Watch the remaining quota for all three tiers, not just the one that was exceeded.
4
Spread Your Requests
Avoid sending bursts of requests. Distribute them evenly across time.
Example Retry Logic
Monitoring Your Usage
Proactively monitor your rate limits to avoid hitting them:Common Integration Patterns
Batch Processing
When processing multiple items, respect rate limits:Real-time Applications
For real-time apps, check quotas before making requests:Troubleshooting
Common Issues
Getting 429 errors despite low usage
Getting 429 errors despite low usage
Cause: Sending requests in tight loops can exceed per-second limits even with low overall volume.Solution: Add small delays between requests or implement proper retry logic.
Inconsistent rate limit behavior
Inconsistent rate limit behavior
Cause: Rate limits are enforced per client ID. Using multiple API keys may have different limits.Solution: Check your client configuration and ensure you’re using the correct authentication token.
Daily limits resetting at unexpected times
Daily limits resetting at unexpected times
Cause: Daily limits reset at midnight UTC, which may differ from your local timezone.Solution: Convert the
X-RateLimit-Reset-Day timestamp to your local timezone to see the actual reset time.Getting Help
If you’re experiencing persistent rate limiting issues:- Check your plan limits in the TitanX dashboard
- Review your request patterns for burst behavior
- Verify your authentication tokens are correct
- Contact support with your client ID and example requests
Need higher limits? Upgrade your plan in the TitanX dashboard or contact our sales team for enterprise options.