Skip to main content

Errors and rate limits

Practical guidance for integrating with the QuantDesk gateway. Exact limits per route evolve — treat Swagger responses as authoritative for your deployment.

HTTP status codes you will see

CodeTypical meaningWhat to do
400Bad request / validationFix payload; compare body to Swagger schema
401UnauthorizedRefresh auth; confirm wallet/session or Bearer token
403ForbiddenCheck roles/scopes for the route
429Too many requestsBackoff and reduce cadence; respect Retry-After if present
500Server errorRetry with backoff; surface correlation ID if your deployment adds one
503Temporarily unavailableRetry with longer backoff; check status/incidents

V2 hardened error codes

In addition to standard HTTP codes, the V2 engine may return specific business errors in the response body or as SBF program errors:
Error codeMeaningContext
SlippageExceededTrade band violationSocial trades must stay within 100bps of oracle price.
PriceStaleOracle update timeoutOracle must have updated in the last 20 seconds.
InvalidOraclePricePrice sanity failureOracle reported price is negative or zero.

Rate limiting (conceptual)

The gateway applies tiered limits on sensitive surfaces (for example auth, trading-related routes, admin, webhooks, and general API traffic). Paths under /api/ are affected differently — prefer steady request pacing over bursts.

Client-side discipline

  • Cache stable reads where safe
  • Debounce UI-driven spam
  • Use bulk endpoints when documented instead of fan-out

Parsing errors

Prefer structured JSON error bodies when returned; log status, route, and a short correlation fingerprint — never log secrets or full JWTs.