Skip to main content
A firm API key (X-Tradara-Api-Key) can call both routes. The key needs accounts:write and can only act on accounts in its firm. A lockout rejects new order entry on that account (lockout_active). It does not cancel working orders or flatten positions. Pair it with flatten and cancel when you also need to clear exposure. Lockout is independent of emergency halt. Halt stamps FIRM_EMERGENCY_HALT on every account. A per-account lock uses a different reason so you can release it without releasing the firm-wide halt.

Lock (block order entry)

operationId: lockoutAccount

Body

Do not send FIRM_EMERGENCY_HALT here. That reason is reserved for halt. You cannot clear it with DELETE /v1/accounts/{id}/lockout — only halt release does.

Response — 200 OK

Downstream order placement then returns 422 with code: lockout_active. Firm WebSocket and webhooks emit accounts.locked (and accounts.updated with action: lockout).

Unlock (restore order entry)

operationId: unlockAccount Clears the account lockout and asks risk-engine to drop the in-memory halt for that account. Unlock does not restore a failed account to active. A hard breach (max loss, firm daily loss, weekly loss) stays failed until you unbreach that account.

Response — 200 OK

You cannot unlock while a firm-wide emergency halt is still active, and you cannot use this route to clear FIRM_EMERGENCY_HALT. Release halt first, then unlock any leftover per-account ADMIN_TRADING_DISABLED locks. Firm WebSocket and webhooks emit accounts.unlocked.

Errors