Rate Limits & Errors
Rate limiting ensures fair resource allocation and system stability for all users.
Limit: 10,000 requests per day per API key
Rate Limit Headers (RFC 6585 compliant):
X-RateLimit-Limit: 300 # Maximum requests per window
X-RateLimit-Remaining: 245 # Remaining requests in current window
X-RateLimit-Reset: 1698765432 # Unix timestamp for window reset
X-RateLimit-Window: 60 # Window duration in secondsHTTP 429 Response (Rate Limit Exceeded):
{
"ok": false,
"error": "RATE_LIMIT_EXCEEDED",
"message": "Rate limit exceeded for API key",
"retryAfter": 30,
"limit": 300,
"window": 60,
"documentation": "https://docs.unikron.xyz/rate-limits"
}Best Practices
- Implement exponential backoff on 429 responses
- Cache quote responses (valid for ~30 seconds)
- Use WebSocket connections for real-time data instead of polling
- Monitor rate limit headers to prevent quota exhaustion
- 📧 Contact help@unikron.ch for tier upgrades
Enterprise Custom Limits
Upgrade to enterprise for:
- 🏢 Dedicated API infrastructure
- ⚙️ Custom rate limit configurations
- 🎯 Priority support and SLA guarantees
- 📋 Regulatory compliance assistance
Error Codes
| Code | Description | Action |
|---|---|---|
| 400 | Bad Request | Check parameters |
| 401 | Unauthorized | Verify API key |
| 404 | Not Found | Check order ID |
| 409 | Conflict | Nonce conflict, retry with new quote |
| 429 | Rate Limited | Wait and retry |
| 500 | Server Error | Retry with backoff |
| 503 | Service Unavailable | Upstream aggregator down, retry |
Error Response Format:
{
"ok": false,
"error": "Invalid token address",
"details": {
"field": "sellToken",
"reason": "Invalid checksum"
}
}Last updated on