Risk & security

Limits live on the server. Clients cannot negotiate them.

The frontend, the EA, and the copy engine can request a trade. Only the risk engine can approve it. A violation is a reject — not a warning banner.

Hard limits

Configurable per account and strategy. Enforced in FastAPI before any order reaches the execution queue.

  • Maximum risk per trade
  • Maximum daily loss
  • Maximum overall drawdown
  • Maximum open positions
  • Maximum exposure
  • Maximum lot size
  • Maximum leverage
  • Maximum number of trades
  • Maximum correlated exposure
  • Maximum strategy exposure
  • Maximum account exposure
  • Emergency trading shutdown

Kill switch

Stop approvals without erasing the book.

Global, account, and strategy kill switches halt new approvals, copy orders, and strategy execution. Existing account information is preserved. Resume requires an authorized action and writes KILL_SWITCH_CLEARED.

Access

Credentials never reach the browser.

  • JWT access tokens and rotating refresh tokens
  • Password hashing and role-based access control
  • API keys issued once, stored hashed
  • Rate limiting, validation, and audit logging
  • MT5 secrets stay on the control plane

Audit

Every risk decision is an event.

TRADE_REQUESTED

RISK_CHECK_STARTED

RISK_CHECK_PASSED

RISK_CHECK_FAILED

TRADE_APPROVED

TRADE_REJECTED

ORDER_SENT

ORDER_FILLED

ORDER_FAILED

POSITION_MODIFIED

POSITION_CLOSED

KILL_SWITCH_ACTIVATED

Inspect the risk desk.

Utilization meters, configured ceilings, and the live event stream.