Skip to content

Rate Limiting

TradeX APIs implement rate limiting to ensure fair usage and system stability.

All API responses include rate limit information in headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200
  • X-RateLimit-Limit: Maximum number of requests allowed in the time window
  • X-RateLimit-Remaining: Number of requests remaining in the current window
  • X-RateLimit-Reset: Unix timestamp when the rate limit resets

Rate limits vary by service and endpoint:

  • Market Data API: 100 requests per second
  • Order API: 10 requests per second
  • Auth API: 5 requests per second
  • User API: 20 requests per second
  • Wallet API: 10 requests per second

When you exceed the rate limit, you’ll receive a 429 Too Many Requests response:

{
"error": "Rate limit exceeded",
"retry_after": 60
}
  1. Implement exponential backoff: Wait progressively longer between retries
  2. Cache responses: Store frequently accessed data locally
  3. Batch requests: Combine multiple operations when possible
  4. Monitor headers: Track your rate limit usage
  5. Use WebSockets: For real-time data, use WebSocket connections instead of polling

WebSocket connections have separate rate limits:

  • Subscriptions: Limited by connection
  • Messages: Throttled per channel type
  • Reconnections: Limited to prevent abuse

See the WebSocket API documentation for details.