Skip to main content

Handle API rate limits effectively

  1. Treat REST request limits and realtime control-plane limits as different problems.
  2. Build retry behavior around classification rather than around one generic backoff rule.
  3. Track request and reconnect pressure before it becomes visible as hard failures.
  4. Preserve local state and idempotency context while throttling.
  5. Resume at a controlled pace after throttling instead of replaying a burst.

Separate the rate-limit surfaces

SurfaceWhat to plan for
REST request submissiondocumented DDX-balance tiers, burst behavior, and 429 RateLimit handling
Realtime control planeconnection, flooding, and subscribe or unsubscribe pressure without assuming one published numeric table
Webserver or leader transitionsdelayed responses, 421, or 503 that can look like rate problems but require different recovery posture

Build the retry policy by class

  1. On 429 RateLimit, use bounded exponential backoff with jitter.
  2. On replay-window or signing failures, rebuild the request instead of retrying unchanged.
  3. On SafetyFailure, fix the request or account state first.
  4. On WebSocket control-plane errors, slow the subscribe or unsubscribe pattern before reopening more connections.

Reduce burst pressure before the server has to

  • batch or schedule non-urgent writes
  • avoid reconnect storms across multiple workers
  • avoid repeated subscribe and unsubscribe churn for the same symbols
  • prefer one durable connection with measured resubscribe logic over many short-lived sockets

Keep throttling from corrupting state

  1. Record the request identifier, nonce, timestamp, and intended action before submission.
  2. If throttling delays the write path, do not assume the order never reached the system.
  3. Reconcile the eventual outcome from REST and realtime before replaying the same intent.
  4. Treat delayed responses during bursts as pressure signals even before a visible 429.

Boundary rule

This page is about client-side rate-limit posture and recovery. Use the reference pages for the exact published tier matrix and current error classes.

Next routes

Last modified on April 13, 2026