Skip to main content
All Ratio API errors follow a consistent JSON format with machine-readable codes for programmatic handling and human-readable messages for debugging.

Error response format

string
Machine-readable error code. Use this field for programmatic handling — do not parse message.
string
Human-readable description of the error.
string
Affected corridor, if applicable.
string
ISO 8601 server timestamp.
string
Unique request identifier. Include this when contacting support.

FX Engine errors

These errors originate from the FX Engine and are specific to quote and execution operations.

General API errors

Retry guidance

Never retry 400 errors with the same parameters. They indicate a client-side issue that must be corrected before retrying.

Best practices

  • Always check error.code for programmatic handling. Do not parse the message string — it is intended for human debugging only and may change.
  • Log error.request_id for every error response. This is essential for support escalation.
  • Monitor GET /v1/system/state proactively rather than waiting for 503 errors. This lets you disable corridors in your UI before users encounter failures.
  • Implement graceful degradation. When a corridor enters a protective state, show users a clear message rather than exposing raw error codes.
  • Use exponential backoff for 500 and 503 retries to avoid overwhelming the system during recovery.