Skip to main content

Unified Error Code Reference

This page consolidates all error codes, rejection codes, and HTTP error responses across the Ratio FX system. Partners should use this as the primary reference for building error handling, retry logic, and user-facing messages.

FX Engine — Rejection Codes

These codes are returned when the FX Engine rejects a quote or execu request. Each code maps to a specific pipeline layer.

HTTPCodeMessageLayerCauseRetry?
400DIRECTION_BLOCKEDTrade direction not permitted under current stateLayer 2RESTRICT state active; only one direction allowed for this corridorWait for state recovery or try opposite direction
422NO_VIABLE_RFQ_QUOTEExternal RFQ returned no acceptable quoteLayer 3Size exceeds Active Pool depth and no external MM quote within acceptable deviation bandRetry with smaller size or wait for liquidity
422CROSS_LEG_INSUFFICIENTInsufficient liquidity for cross-route executionLayer 4One or both legs of MYR-IDR cross route lack sufficient Active Pool depthRetry with smaller size or use direct corridor
503ORACLE_STALEOracle price data is outdatedLayer 5Freshness threshold breached; state set to HALTWait for oracle recovery (typically seconds)
503ORACLE_DEVIATIONOracle sources diverge beyond acceptable thresholdLayer 5Pyth and Orakl rates deviate beyond configured corridor maximumWait for oracle convergence
503QUOTE_HALTEDSystem is in HALT state; no new quotesLayer 6Severe volatility or oracle failure has triggered HALTWait for system recovery; monitor /v1/system/state
400BELOW_MIN_TRANSACTION_SIZETransaction amount is below the minimum for this corridorLayer 1Amount less than smallest fee tier min_amountIncrease amount to meet corridor minimum
400ARB_CHECK_FAILEDQuote failed arbitrage validationLayer 8One of three arb checks failed: internal consistency, synthetic gap, or triangular loopRe-request; market conditions may have shifted
400QUOTE_EXPIREDQuote has expired; please re-requestLayer 9Execution attempted after quote expiry timestampRe-request a fresh quote

Retry Guidance

HTTP CodeCategoryRecommended Action
400Client-side or timing issueRe-request with corrected parameters or fresh quote
422Liquidity or size constraintReduce trade size, try different corridor, or wait for liquidity
503System-level issueWait and retry after 5–30 seconds; check system state endpoint

Reserve Pool VaR — API Error Codes

These codes are returned by the Reserve Pool risk management endpoints (/v1/reserve/*).

HTTPCodeDescriptionResolution
403INSUFFICIENT_SCOPEEmergency RFQ and state override endpoints require ops-level authentication scopeUse ops-level bearer token
409EMERGENCY_RFQ_IN_PROGRESSAn Emergency RFQ is already in progress for this corridorWait for current Emergency RFQ resolution before triggering another
422CORRIDOR_HALTEDCorridor is in HALT stateManual intervention required before any automated actions can proceed
422BELOW_MIN_LIQUIDITYReserve Pool is below minimum liquidity thresholdCannot execute rebalance that would further reduce USDT balance

General API Errors

These apply across all Ratio FX endpoints.

HTTPCodeDescriptionResolution
401UNAUTHORIZEDMissing or invalid Bearer tokenCheck authentication credentials
403FORBIDDENValid token but insufficient permissions for this endpointRequest appropriate access scope
404NOT_FOUNDRequested resource does not existVerify corridor name, batch ID, or endpoint path
429RATE_LIMITEDToo many requestsImplement exponential backoff; respect Retry-After header
500INTERNAL_ERRORUnexpected server errorRetry after delay; contact support if persistent

Error Response Format

All error responses follow a consistent JSON structure:

{
"error": {
"code": "QUOTE_EXPIRED",
"message": "Quote has expired; please re-request",
"layer": "Layer 9",
"corridor": "USD-IDR",
"timestamp": "2026-02-27T10:05:00Z",
"request_id": "req_abc123"
}
}
FieldTypeDescription
codestringMachine-readable error code (use for programmatic handling)
messagestringHuman-readable description
layerstringPipeline layer where the error originated (FX Engine errors only)
corridorstringAffected corridor, if applicable
timestampISO 8601Server timestamp of the error
request_idstringUnique request identifier for support escalation