Skip to main content
Tradara uses standard HTTP status codes and a single JSON error envelope across every service. The envelope is defined in the shared common.yaml components and is identical for the Trading API and the Prop Firm API.

Error envelope

Some services include additional fields (code, details, request_id) when the failure has structured context. Always read error first; treat extra fields as optional.
Capture the X-Request-Id response header on every failed call. Tradara support uses it to find the matching gateway and service logs.

Status codes

Order-specific errors

POST /v1/orders and related order writes layer additional semantics on top of the generic codes: The order may also transition to REJECTED asynchronously after an initial 202 placement. Watch the order lifecycle stream for that state.

Retries

  • Retry 5xx and network failures with exponential backoff (start at 250 ms, cap at 30 s, jitter 50 %).
  • Retry POST /v1/orders only when you sent an Idempotency-Key. Reusing the same key returns the original response.
  • Do not retry 4xx other than 429 — the request will fail again until you fix it.
  • For 429, honour the Retry-After header.

Example: validation failure

Example: risk rejection

Example: upstream timeout