Skip to Content
Rate Limits & Errors

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 seconds

HTTP 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

CodeDescriptionAction
400Bad RequestCheck parameters
401UnauthorizedVerify API key
404Not FoundCheck order ID
409ConflictNonce conflict, retry with new quote
429Rate LimitedWait and retry
500Server ErrorRetry with backoff
503Service UnavailableUpstream aggregator down, retry

Error Response Format:

{ "ok": false, "error": "Invalid token address", "details": { "field": "sellToken", "reason": "Invalid checksum" } }
Last updated on