London DataTrading systems technology

Nexus deep diveStep 7 · ExecuteCompanion to the case study

Execute.

From a target book to broker orders, with brakes at every step and a reconciliation before every cycle.

The trader runs the book that research promotes, sized by the same position engine the backtest used. A scheduler sends each market's orders at its own exchange's time, staged pre-trade limits check every order, independent brakes can stop trading at once, and positions, funding and fills are reconciled with the broker. It all runs every trading day.

Orders filled1,082on the IG demo account since 7 July, in 34 markets
Markets scheduled37each at its own exchange's time, in three time zones
Position checks1,085against the broker since 26 July, before trading cycles
Safety drills13 / 13passed, from kill switches to flatten

Filled orders read on 2026-11-27 from the trader's order records, through the site's figures register; markets, position checks and drills read on 2026-10-15 from the trader's schedule, reconciliation and drill records. The order figures on this page are from the demo account.

01Order path

From target book to broker order

The Nexus overview shows step 7 as orders passing staged limits on their way to the broker. This is the whole path, and every step of it runs every trading day.

Animated schematic: three orders leave the target book. A normal order passes the pre-trade limits, a risk-reducing order passes even at a warning, and an oversized order is flagged at the warn stage. Filled orders are reconciled with the broker's demo account.
Step 7 of the platform walkthrough on the Nexus overview.
  1. 1

    Promoted book

    An account trades only the research book promoted for it. If that link is unknown or wrong, new risk is removed and exits still go out.

  2. 2

    Same sizing

    The trader and research pin the same position engine, so a backtest and the live book can't disagree about how a signal becomes a position.

  3. 3

    Checked

    The book is built only when every input market's data is complete. A closed market takes no orders, and stakes are rounded to the broker's deal steps.

  4. 4

    Sent

    Every order passes the pre-trade limits. A flip is a close, then an open that is sent only after the close confirms.

  5. 5

    Reconciled

    Positions are checked against the broker before every cycle. Funding and fills are reconciled every night.

For your firmEvery trading day starts with a full-book dry run before the first slot, 78 of them since 24 August, so the day's orders are rehearsed before any reach the broker.

02Pre-trade limits

Limits that never trap a position

Every order is checked against size, notional and position limits, set for 122 scopes from a single instrument up to a whole asset class. The limits are staged from off to warn to block, and the next stage is switched on only when the evidence says it is safe.

  • Size, notional, positionRuns

    Maximum order size, maximum notional and maximum position are checked on every order, and any breach is written on the order record itself.

  • Risk-reducing always passesRuns

    No stage ever refuses an order that reduces a position, so a limit can't trap the book. The check still runs and is recorded.

  • Price collarsRuns · warn

    Each order's price is compared with an independently captured price, and unusable quotes are caught.

  • Margin capRuns

    A margin cap trims the plan or stops the run before anything reaches the broker. It has never had to fire in production, and a drill proved that it works.

  • Early warningRuns

    Alerts fire at 50% and 80% of a limit, with hysteresis so they don't flap.

  • Block modeBuilt, tested

    Block mode refuses a breach, and it refuses any instrument that has no limit set. It goes live only once a replay of real fills under block refuses nothing. The replay of 2 September 2026 refused none of 306 fills, and block is now set account by account, on the operator's word.

03Brakes

Independent brakes, any one of which stops trading

  • A kill switch that depends on nothing. It is a file, controlled from outside the trading process, and it needs no database and no application. If it can't be read, it counts as on. It is checked before every execution.
  • A halt flag in the database. It has stopped 20 live runs.
  • Automatic halts. An equity drop from peak freezes every order, exits included. A run of order failures or errors halts trading too.
  • A dead-man switch. Trading halts after a set number of days without an authenticated operator action.
  • A latch for people. A repeated-execution latch stays on after the halt is cleared, until a person clears it.
  • Flatten always works. Closing positions is a separate path that no brake blocks.
04Broker contract

One contract between the book and the broker

The model contract describes what a strategy wants to hold. A broker contract describes what Nexus can trade, how it sends an order, and what the broker reports back. Each broker gets an adapter: a translator between its own API and the common language of the trading engine.

The aim is to connect a second broker without rewriting the strategy, risk controls or reconciliation. Nexus already has the starting interface and an account-based adapter selector. IG is implemented; Interactive Brokers is a placeholder. A fully portable contract is the next step, proposed here. The first implementation would use IG. IB could be added alongside it later, on separately configured accounts.

IG · demo execution IB · stub only Full contract · proposed
Proposed broker boundary: the Nexus book, sizing and controls send orders through a common contract to an IG adapter or a future IB adapter. Fills, positions, cash and margin return through that same boundary for reconciliation. IG is implemented; the optional future IB path is dashed and not connected.
One boundary, in both directions. Nexus owns the target book, sizing policy, limits and reconciliation. Each adapter owns the connection, broker identifiers and translation. The wider contract shown here is proposed; the existing interface is narrower.

What belongs in the contract

A common method name is only the beginning. The contract also fixes units, identity, freshness and failure behaviour. These are the eight parts a second adapter should satisfy.

Proposed scope, compared with the current implementation. “IG” describes existing broker-specific behaviour, not proof that IB is interchangeable.
ElementWhat crosses the boundaryWhere Nexus stands
1. Account & sessionBroker, account and demo/paper/live identity; connect, disconnect, health and permissions. Every result belongs to one account and environment.Exists: account registry, adapter selection, login and authentication. To add: a common health and reconnect contract.
2. Instruments & unitsResearch ticker → exact tradable product, venue and expiry; broker ID, quantity unit, minimum and increment, price tick, point value, currency and trading hours.Exists for IG: market lookup and dealing rules. To add: IB contract resolution and futures specifications.
3. Quotes & capabilitiesTimestamped bid/offer and market status, with source and freshness; supported order types, time-in-force, cancel/replace and data permissions. Unsupported requests receive a named refusal.Exists for IG: quotes and market rules. To add: a versioned capability declaration and common quote shape.
4. Order requestsAccount, instrument, side, quantity and unit, type, optional limit price, time-in-force, intent ID and book/run attribution. Submit, inspect, cancel; replace only when supported.Exists: order placement through the interface. To add: typed neutral requests and cancellation semantics.
5. Order events & fillsBroker order and execution IDs, status, each partial fill, remaining quantity, price, fees and timestamps. Acceptance, execution and cancellation are distinct events.Exists for IG: confirmation and fill recording. To add: a common event lifecycle, replay and deduplication.
6. Positions & capitalPositions by exact contract, signed quantity and unit, average price; cash by currency, equity, available funds, initial/maintenance margin and valuation time.Exists: shared position and account records. To add: explicit units, freshness and multi-currency/margin semantics.
7. History & reconciliationOpen orders, executions, cash movements, commissions, funding and statements, with stable IDs and retrieval checkpoints. Nexus compares them with its own ledger.Exists for IG: position, funding and fill workflows. To add: a portable history contract and IB reconciliation.
8. Failures & recoveryNamed rejection, unavailable data, lost session, rate limit or unknown order outcome; bounded retries and an audit trail of request, reply and recovery.Exists for IG: pacing and error handling. To add: shared failure meanings and restart/recovery proofs.
The interface already in the code

The current BrokerClient protocol has seven methods, an authentication flag and account configuration. The factory selects IG, the internal simulator or the IB stub from the account's broker setting.

login() / authenticated
Establish a session and report whether it is authenticated.
account()
Read account balances and funds.
positions()
Read the broker's open positions.
market(epic)
Read a market's details using its broker identifier.
search_markets(term)
Find candidate instruments.
place_order(order, currency)
Submit an order and return a broker reference.
confirm(reference)
Retrieve the broker's confirmation.

BrokerPosition already holds an instrument key, signed size, average level, deal IDs and currency. BrokerAccountSnapshot holds equity, available funds, balance, margin used, P&L, currency and account ID.

Several calls still return raw dictionaries, and execution callers still interpret IG fields such as dealStatus. The records also lack explicit quantity units and observation times. The interface is a useful starting point; completing the neutral types and migrating their callers is part of making a second broker work.

Same intention. Different tradeable units.

A broker switch starts from the desired exposure and sizes it for that broker's product. Copying the order quantity would change the risk.

IG today

Spread-bet stake

£ per point

Exposure becomes a stake on the mapped IG market, rounded to that account's dealing increment. The price convention and point value determine its money exposure.

IB futures · to build

Exchange-traded contracts

Whole contracts

Exposure becomes a number of a specific futures contract, using its multiplier and currency, then FX into the book's currency. Expiry, roll, fees and margin need their own treatment.

The promise of plug-and-playChoose an admitted broker adapter and account; reuse the model and the control framework. Recalculate quantities and costs for its instruments. Equivalent exposure is the objective; identical fills, costs and returns are not guaranteed. A new adapter must pass the same conformance checks before it is selectable for execution.

A proposed order exchange, including the awkward case

This is an illustrative message contract, not a callable API or an enabled IB account.

Nexus → adapter: contract version; account and environment; resolved instrument ID; BUY; quantity 2, unit contracts; LIMIT; limit price in the declared quote unit; DAY; unique intent ID; book/run ID; creation and expiry times.

Adapter → Nexus: the same intent ID plus a broker order ID and acknowledgement. Later: an execution ID for each fill, quantity, price, currency, fees and execution/receipt times. A fill of 1 leaves 1 working; the order is not complete.

If the connection drops after sending: mark the outcome unknown, query orders and executions, and reconcile before deciding whether to retry. A timeout is not a rejection. A repeated request with the same intent ID must not create a second order.

Duplicate or out-of-order notifications must not double-count a fill or roll back a completed state. A cancel request is pending until confirmed; a fill can arrive while cancellation is in flight. Missing balances or stale positions must be reported as unavailable, never silently turned into a zero position or a healthy account.

Where the responsibility staysNexus decides what to trade and whether the controls permit it; the adapter translates and reports broker facts. A capability mismatch stops admission. Adding IB does not automatically reroute an IG order, transfer an open position, or authorise live money.

The IG connection in operation · measured 15 October 2026

The IG REST client places orders, confirms them and reads positions, selecting demo or live by account configuration. It paces requests to IG's allowance. The recorded sample had 780 confirmed orders; median send and confirmation times over 696 confirmed orders were 74 ms and 71 ms. Rejections fell from 117 in July to none in the October sample. These are the original dated measurements, not a new live readout.

Broker section checked against trader source on 26 October 2026: the broker protocol and records, adapter factory, IB stub, account registry and IG execution callers. The fuller contract above is a proposal; the target specification and transition plan are recorded in the engineering handbook. IB's official documentation describes contract identity and fields and the order callbacks an adapter must monitor. The rest of this page retains its dated operational evidence.

05Reconciliation

Reconciled before every cycle, and again every night

A reconciliation is only useful if it can stop trading. The position check can, and it has: 74 live runs were stopped because the books didn't agree or the check couldn't finish.

  • Positions, before every cycleRuns

    Positions are checked against the broker before each trading cycle, and a break halts the run. There have been 1,085 checks since 26 July. Since 15 September, 227 of 230 were clean.

  • Book against researchRuns

    A daily check compares the trader's book with research's targets. It has run 182 times and halted trading 3 times.

  • Funding, nightlyRuns

    IG transaction history is pulled every night and reconciled against the model's funding, and breaks are flagged for follow-up.

  • Portfolio ledgerRuns

    Fills sync into the portfolio ledger every night: 361 transactions over 53 runs since 23 August.

  • Next-morning auditRuns

    Each trading day is audited the next morning, 168 times so far.

  • Broker statementsBuilt

    Reconciliation against the broker's statements is built and has not run yet.

06Scheduling

Each market at its own exchange's time

A resident scheduler trades each of 37 markets at its local exchange time, in Chicago, New York and London, and stays correct across daylight-saving changes. It made 908 live runs over 90 trading days, from 7 July to 14 October.

  • Idempotent. A slot that has already run doesn't run again.
  • Dry run by default. Sending real orders is an explicit setting, never an accident.
  • Data first. A market trades only when its inputs are complete.
  • Rehearsed daily. A full-book dry run comes before the first slot of every trading day.

How it is scheduledEvery trading job is a systemd unit on the production host, with no separate job framework: Scheduled by systemd.

07Stated plainly

What runs, stated plainly

Each control is shown at the stage it has reached in production.

Runs today
  • One position engine for research and trading, and a promoted book per account.
  • A per-market scheduler, with a full-book dry run every trading day.
  • Size, notional and position limits at the warn stage, recorded on every order, which never stop a risk-reducing order.
  • The kill switch, the halt flag, automatic halts, the dead-man switch and the latch.
  • Position reconciliation before every cycle, and nightly funding reconciliation and ledger sync.
Built, not yet switched on
  • Block mode for price collars, which have not yet had a replay of real fills. Order limits have been set to block account by account since November 2026.
  • Broker statement reconciliation.
  • A second demo account for testing several accounts at once, held in dry run.
Not built
  • A second broker. The Interactive Brokers adapter is a stub; its operational methods fail explicitly. The broker contract above describes the proposed common interface.
  • The order figures on this page come from the IG demo account, and there is no live track record.
  • The brakes stop new orders. They don't cancel orders resting at the broker, close positions or end the broker session; flatten does the closing.
  • Reconciliation reports breaks rather than claiming a clean record, and some funding breaks are open now.
  • One broker (IG spread bets), one production host and one operator.
  • This page describes the framework. It shows no trading results and makes no performance claim.

Sources, read 2026-10-15: the trader's order, account, schedule, scheduler-run, limit, reconciliation and drill records; the portfolio ledger's sync runs; the deployed versions of the trader and the research service; the trader's code and documentation on its main branch; and the handbook's status page.

Taking a strategy from backtest to broker?

I can set up the order path, the pre-trade controls and the reconciliation around your book.