One gate for every order

The safety governor takes over the one entry point every strategy order passes through. It is installed before the strategy is added, and it refuses to start if the engine cannot let it deny orders. While trading is halted, only an order that shrinks a held position, without crossing to the other side, gets through. Cancels are never blocked.

The gate fails closed. A book that cannot be valued halts new entries, and an error inside the governor becomes a halt, not a crash.

  1. Is trading halted? Then only orders that reduce a position pass.
  2. Is the book valued? A coin without a price halts new entries.
  3. Risk limits Leverage, a day's loss, the drop from peak, a coin's position size.
  4. Prop-firm guard The evaluation's loss floors and its size and margin caps.
  5. Order queue Paced, first in, first out, then the exchange (sheet A-02).

FIG. 1 What an order meets between the router and the exchange.

Source: BillionArch platform code.As of 19 October 2026.

What each limit does

The limits come from the bot’s start-up file, and no control on the dashboard can change them while it runs.

  • Drop from peak. Trips the circuit breaker and closes every position. Only a person can re-arm it.
  • A day’s loss. Either halts new entries until the next daily close, or only sends an alert; each profile says which. The books running today are set to alert.
  • Leverage. Halts new entries for as long as it is over the limit.
  • A coin’s position size. Sends an alert.

The circuit breaker also counts consecutive losing trades and the exchange’s rejections, but never its own refusals. A halt that clears itself writes a matching event saying it has lifted, so every pause in the log has an end.

The kill switch

The dashboard has two kill-switch controls. Pause new trades refuses entries and still allows exits. Close all positions cancels working orders, sends one close for each position, and holds; it asks the owner to type a confirmation first. If a position will not close after repeated attempts, the engine stops trying and names the coins it could not close.

The prop-firm guard

For a prop-firm evaluation, the guard reads the exchange’s own wallet balance on a short interval. As the account nears the evaluation’s daily loss floor, it closes the book and holds new entries until the next daily close; near the total floor, it holds until a person resumes. At the gate it also refuses orders over the firm’s size and margin caps. If it cannot read the wallet for too long, it sends a critical alert and holds new entries rather than trade blind.

Every restart is a recovery

After a restart, new entries are held until the engine’s positions have been compared with the exchange’s. Each difference is classified, and only one kind is adopted automatically: the exchange is flat where the engine thought it held a position. Anything else halts trading and raises an alert. Every comparison is written to the event log.

The paper venue forgets its positions when it restarts, so before that comparison it is handed the ledger’s positions and cash back. Without that step, every deploy used to leave the paper book’s legs open in the ledger and gone from the venue.

  1. demo-donchian-bybit

    ! Trading paused

    entries held: recovering: the venue has not been reconciled yet

  2. demo-donchian-bybit

    · Trading resumed

    hold lifted: recovering: the venue has not been reconciled yet

FIG. 2 Two Telegram alerts from one engine restart on 4 October 2026: new trades were held until the exchange had been reconciled, then released 11 s later.

Source: BillionArch event log, Telegram deliveries.As of 19 October 2026.Demo

Alerts that report their own failures

A dispatcher turns events into Telegram messages and records every attempt, including the ones that fail. After a failure it queues the messages and backs off before trying again. It also checks each engine’s heartbeat, and an engine that claims to be running but has gone silent raises an alert of its own. Messages are plain text with the important line first, so nothing is lost to formatting.

Failure modes are kept in a catalogue: how each one is detected, how the system responds, and how it is tested. The rule is that none goes live without its test, and every real incident adds a row and a regression test.