Skip to main content

Error Model

Senticore uses a stable error envelope across all JSON surfaces.

HTTP error envelope

{
"error": {
"code": "insufficient_collateral",
"message": "Available collateral below order requirement",
"retryable": false,
"details": {
"required": "1500.00",
"available": "1200.00"
}
}
}

HTTP status mapping

StatusMeaning
200Success
400Request validation failed
401Authentication required or invalid signature
403Authenticated but not authorized
409Idempotency conflict or state conflict
422Business rule rejection
429Rate limit exceeded
500Internal error, retryable
503Service unavailable, retryable

Common error codes

CodeSurfaceRetryableMeaning
unknown_marketAllNoMarket id not recognized
tick_size_violationTradingNoPrice not aligned to market tick
lot_size_violationTradingNoQuantity not aligned to lot size
min_notional_violationTradingNoOrder value below minimum
max_quantity_violationTradingNoPer-order cap exceeded
book_depth_fullTradingNoPrice-level cap reached
insufficient_collateralTradingNoPre-trade margin failure
reduce_only_violationTradingNoWould increase position
post_only_would_crossTradingNoPost-only order would cross the spread
self_trade_preventionTradingNoSTP rule triggered
nonce_usedTradingNoReplay protection
nonce_staleTradingNoToo old
invalid_signatureAllNoSignature verification failed
wrong_chain_idAllNoEIP-712 domain mismatch
rate_limitedAllYesBackoff per Retry-After
temporary_unavailableAllYesInternal retryable condition

Retry semantics

Clients should:

  • retry only retryable: true errors,
  • use exponential backoff with jitter starting at 250 ms and capping at 5 seconds,
  • respect Retry-After for 429 and 503,
  • use idempotency keys so retries are safe,
  • surface non-retryable errors to the user or strategy without automatic retry.