Improved
Error responses documented on rebalancing endpoints
October 30th, 2026
Broker API
All 13 rebalancing operations now document the errors the service returns, each with a named example showing the HTTP status, numeric code, and message from the {code, message} error body.
- Adds
400,401,403,404,415,422, and500responses where applicable, with per-case examples such as invalidportfolio_id, duplicate assets, weights that must sum to 100, account not funded, subscription already exists, and run not cancelable. - Adds an
UnexpectedErrorschema for unhandled server errors, which returns{error, message}with no numeric code. DELETE /v1/rebalancing/portfolios/{portfolio_id}no longer documents400; the service does not return it. An invalidportfolio_idreturns422invalid portfolio_id, and an already inactive portfolio returns422nothing to delete.- Clarifies cancel-run behavior: only runs in
QUEUEDorIN_PROGRESScan be canceled, and canceling does not stop orders already placed, so the final run status can replaceCANCELED. ThePortfolioRunStatusdescription is updated to match.