Errors
Start with the HTTP status, then read the response body for details. Some errors include a machine-readable code alongside the message.
HTTP status reference
400Bad Request- Check the request fields, values, and available balance. For a batch order, inspect each result before resubmitting.
401Unauthorized- Check the bearer token and confirm the key is active and unexpired.
403Forbidden- Check the key’s scopes and any IP allowlist. Account restrictions or an unverified email can also block access.
404Not Found- Check the resource ID and endpoint path.
409Conflict- On endpoints with replay support, reusing an Idempotency-Key with a different JSON body can return IDEMPOTENCY_KEY_CONFLICT.
429Too Many Requests- Pause requests in the affected budget. Follow Retry-After when the response includes it.
503Service Unavailable- A service may be at capacity or temporarily disabled. For an uncertain order outcome, check orders and fills before resubmitting.
Portfolio capacity and retries
Full equity and equity history share calculation capacity. If it is busy, either read can return 503 immediately. Equity summary has separate capacity. A per-user rate limit returns 429.
- Wait for the delay in Retry-After before repeating the same GET.
- If the service stays busy, increase the delay with jitter and cap retries. Send one retry at a time.
- Each retry counts toward your rate limit. Waiting does not reserve capacity. If reads still fail, show the data as unavailable.
HTTP/1.1 503 Service Unavailable
Retry-After: 1
Cache-Control: no-store
Content-Type: application/json
{
"statusCode": 503,
"error": "Service Unavailable",
"message": "Portfolio calculations are busy. Please retry shortly."
}