Error Codes
API error responses and their meanings.
HTTP Status Codes
| Code | Description |
|---|---|
200 | Success |
201 | Created (signal executed) |
202 | Accepted (signal scheduled) |
400 | Bad Request (validation error) |
401 | Unauthorized (invalid API key) |
403 | Forbidden (insufficient permissions) |
404 | Not Found |
409 | Conflict (duplicate intent, opposing position, etc.) |
429 | Rate Limited |
500 | Internal Server Error |
503 | Service Unavailable |
Error Response Format
{
"error": "Error message",
"code": "ERROR_CODE",
"details": [
{
"path": ["field"],
"message": "Field-specific error"
}
]
}
Common Error Codes
| Code | HTTP | Description |
|---|---|---|
VALIDATION_ERROR | 400 | Request body failed validation |
SIGNAL_REJECTED | 400 | Signal rejected (duplicate sourceId, etc.) |
ACCOUNT_NOT_FOUND | 404 | Account ID not found or no access |
STRATEGY_NOT_FOUND | 404 | Strategy ID not found or no access |
INSUFFICIENT_FUNDS | 400 | Account has insufficient buying power |
MARKET_CLOSED | 400 | Market is closed for this symbol |
SERVICE_DISABLED | 503 | Signal processing is disabled |
DUPLICATE_INTENT | 409 | A same-direction live signal already exists for this (accountId, strategyId, symbol, action). Response details.conflictingSignalId carries the id. |
OPPOSING_POSITION_OPEN | 409 | The request would open the opposing side of an existing non-terminal trade for the same (account, symbol) on a netting broker (Alpaca, TradeStation). Response details.conflictingTradeId carries the existing trade id. Same-side stacking is allowed; opposite-side is not, because netting brokers cannot represent both sides at once. Close the conflicting trade to flat first, or route the strategy to a different account. |
RECALC_WOULD_OVER_EXPOSE | 409 | Returned by the POST /api/v1/reconciliation/repair/{tradeId}/* endpoints (and the other reconciliation mutation paths) when rebuilding a trade's aggregates from its executions would push the sum of UTM open shares for the trade's (account, symbol, side) above the broker's gross open quantity on that side. The trade is not written. Response details.exceedsBy carries the projected delta and details.conflictingTradeIds lists the contributing trades sorted by openQuantity descending. |