Improved
Per-position errors documented on close all positions
November 3rd, 2026
Broker API
Documents the per-position result returned when closing all positions for an account. The wire contract is unchanged.
- The 207 response returns one result per position:
bodyis the closing Order whenstatusis200, and the error object describing the rejection for any otherstatus. - Adds a documented 422 response for a request-level failure, such as an invalid
cancel_ordersvalue (code40010001); no per-position results are returned in that case. - The
Errorschema now documentscode(usually the HTTP status followed by a five-digit suffix; validation failures keep a400prefix) andmessage, plus the optionalsymbol,existing_qty,held_for_orders, andavailablefields the server can include. - Adds a 207 partial-close example.
Affected Endpoints
DELETE /v1/trading/accounts/{account_id}/positions