Skip to main content
A reliable client treats the API as a bounded queue, not an unbounded loop. Five patterns cover almost every production REST job.

Retry the right failures

Honor Retry-After when a 429 includes it. When it is absent, use capped exponential backoff with jitter and lower concurrency before trying again. Do not retry unchanged after a 4xx that means the request is wrong: authentication, access, malformed request, unsupported symbol, or invalid parameter. Those will fail again the same way. Fix the request or the key first, then resume. Treat 5xx and network errors as transient and retry with backoff.

Log a request handle on every call

Capture meta.request_id from the envelope, or the x-request-id response header when a route returns a resource-specific body instead of the envelope. Log it on success and on failure. A stored request id is what makes a slow or failed call reviewable later, and it is the first thing support will ask for.

Bound concurrency to the plan

Each plan sets a concurrent-query ceiling. Size worker pools to it and queue the rest. Isolate heavy routes — L4, deep history, large windows — from light status checks so one slow worker does not stall the whole pipeline. See Rate Limits for the per-plan numbers.

Reads are safe to repeat

Market-data GETs are idempotent: repeating one returns the same data for the same window, so a retried read cannot corrupt state. That makes bounded retries safe, and it is why a checkpointed backfill can resume without deduplication. Pair retries with Pagination so a resumed run continues from its last cursor.

Gate on data quality

Before a window feeds a backtest, alert, export, or model, confirm it is trustworthy. Check coverage, freshness, gaps, and incidents on Data Quality. A clean-looking response over an incomplete window is the failure mode that quietly corrupts downstream work; the data-quality routes are how you catch it before it ships.

Probe, then widen

One BTC order-book request confirms auth and envelope shape. One bounded trade window confirms pagination and schema. Only after those pass should a job widen across symbols or longer history. Keep the route family, window, page size, concurrency, and retry budget in the job config so any run can pause, resume, and be explained.
Last modified on June 8, 2026