Skip to content

Event Streams and Trading States ​

Every fact the platform acts on is an entry in a named stream of the event store (Event sourcing). This page lists the streams, the control events that record the order path, and the trading states the control engine holds.

Streams ​

StreamWritten byRead byContent
frames-<venue>bijective-data-enginebijective-data-engine --replay-storeEvery frame received, with its arrival time, and the session and continuity marks; written before the frame is read
market-<venue>bijective-data-enginestrategy engine, evaluationNormalised top-of-book updates for one venue
facts-<venue>bijective-data-enginestrategy engineTrades, liquidations, funding, open interest, mark and index prices and long/short ratios for one venue, under the platform's instrument identity; facts on undeclared symbols are counted and stay in the journal and archive
link-<venue>bijective-data-engineconsoleVenue connection state, written on change only
proposalsstrategy engine, live stagecontrol engine, check_orderingProposals from live sessions; the only proposal stream the control engine reads
proposals-paperstrategy engine, paper stagecontrol engine in paper mode, evaluationProposals from paper sessions; matched on the simulated venue, never reaches a venue
proposals-researchstrategy engine, bounded runsevaluationProposals from bounded runs over recorded history
strategy-runsstrategy engineevaluation, reportRun ledger: specification, exit, output digest, and where admitted proposals landed
strategy-sessionsstrategy enginestrategy engineMarket position a live session was sent through on each market stream, so the next session can report the gap
registrationsdeclare_claimevaluationClaims declared before a run: hypothesis, decision rule, horizon, folds
commandsoperator toolingcontrol engine, consoleOperator commands with actor and role
controlcontrol engineconsole, check_orderingControl events (below)
control-feedbackcontrol enginestrategy engineWhat became of each proposal, mirrored from control with the control position it mirrors; completed from control on start
venue-instruments-<venue>data engine of that venuestrategy engineEach venue listing: instrument scales, increments, minimums and trading status, written at start when they differ from the standing record
limitscontrol enginecontrol engine, consoleLimit declarations and the consumption and release of budget
control-paper, control-paper-feedback, limits-paper, commands-papercontrol engine in paper mode, operator toolingstrategy engine (paper stage)The paper node's record, kept apart from the live node's
venue-assurancebijective-verify-venuefee declarationOutcome of each venue check, with the digest of the answer it was drawn from
venue-feesfee declarationevaluationVenue fees; accepted only on a confirmed check drawn from evidence

A stream name admits only alphanumerics, - and _. Entries are append-only and addressed by position; a reader resumes from the last position it acted on.

Control events ​

The control engine writes one event per decision on the order path. Each event carries at_ns (UTC nanoseconds, from the program clock) and, where a stream entry caused it, from_position (the position of that entry).

EventWritten whenKey fields
IntentAn order cleared every check, before the venue calldecision_id, venue (absent on intents recorded before layout version 4), owner (the desk and, where named, the strategy the order was placed for; absent before layout version 5), request (client order id, venue symbol, side, quantity and limit price in venue scale, reduce-only)
InstrumentScalesBefore the first intent on an instrument, and again when its profile declares other scales, identity or quote currency; layout version 15venue, instrument (venue symbol), price_scale, quantity_scale: the decimals every scaled price and quantity of its orders and fills carries, so the record is read without the profile; identity (the platform's identity, the one market streams carry) and quote_currency, absent before layout version 17
HeldA linked proposal was admitted and is held until its parent fills (decision 0013); layout version 12proposal (whole, with its parent and oco), from_position
SettledThe venue answered a placementclient_id, outcome
WithdrawnA cancel was sent and the venue answeredclient_id, instrument, outcome
FilledA fill of an order this platform placed, as the venue reported it; recorded once per execution identifierclient_id, fill (identifier, venue order identifier, side, price, base quantity, fee, liquidity, exchange time, receive time)
RefusedAn order did not reach the venuedecision_id, reason
CapturedA decision was benchmarked against the book at the strategy's decision instantcorrelation_id, decided_at_ns, book (absent when none was within the staleness bound)
CommandAppliedAn operator command was carried out or refusedcommand_id, actor, role, action, state read back, detail
SafeStateDrivenA safe state was called fortarget, reason, arrived (read back), scope
SafeStatePostconditionOne pass after a safe state, exposure was comparedscope, kind, before, outcome (Held, Increased or Unverifiable)
VenueParticipationA venue joined or left the routed setvenue, participation
DayOpenedThe first complete valuation of a UTC day, when a daily-loss or drawdown limit is declaredday (days since the epoch), unrealized_scaled (money scale)
DayPeakThe day's result rose above its highest so far, when a drawdown limit is declaredday, result_scaled (money scale)
AccountChargedA venue charged the account without naming an order (a daily regulatory fee), recorded once per charge identifier; layout version 9venue, charge (identifier, asset, amount paid, scale)
ScopesValuedThe figures below the portfolio changed by the same rule as PortfolioValuedfigures: each scope (desk, venue, strategy, underlying, instrument), kind and value (money scale; net signed). A scope the pass could not measure is absent. The console's Exposure by scope panel reads it
PortfolioValuedThe portfolio figures changed by a hundredth, a figure appeared or was lost, or a minute passed with any changefigures (gross and net exposure, daily loss, each absent when not computed; money scale; leverage and margin use at the ratio scale, present only where a limit declares them and margin was read; equity, what every venue states backs its account in the book's currency, a simulated venue's cash with its positions at the node's marks, absent when a venue is withdrawn or states none, layout version 16), observed_at_ns

Intent is written before the venue is called, so a crash between the two leaves an intent that reconciliation can resolve against the venue. A venue answer that leaves the order's fate open (a timeout, for example) is recorded as such and resolved by reconciliation, never treated as a fill or a failure.

Refusal reasons ​

ReasonMeaning
NotActiveThe trading state does not admit new orders
LimitsUnrecoveredLimit state has not been rebuilt, so no budget figure exists
BreachedObserved exposure exceeds a limit; the action taken is in SafeStateDriven
UnjudgedA limit could not be evaluated
StaleExposure figures are older than the declared freshness bound
ClockSkewExposure figures are stamped after the instant they were judged at
NoBudgetA binding scope has insufficient remaining budget for the order's spend
NotAdmittedDesk admission refused the proposal; the admission message is carried as text
UnreadableThe proposal could not be decoded by this build
InstrumentRefusedThe venue does not take orders for the instrument, or it is below the venue minimum

Trading states ​

The control engine holds one trading state for the node.

StateEffect on new orders
ActiveAdmitted, subject to the pre-trade check
ReducingRefused when they extend an existing net position. A flat instrument is not constrained
HaltedRefused

Severity is ordered Active < Reducing < Halted.

TransitionTrigger
start -> HaltedEvery start. Limit state is replayed and verified first
any -> more severeA breach, an unjudged limit, or a failed postcondition. Automated escalation never relaxes the state
any -> Halted / ReducingOperator Halt / Reduce, when the role permits it
any -> ActiveOperator Resume only, when the role permits it. Not re-applied after a restart

A breach selects Reducing only for an instrument-level breach on a held position at a venue whose reduce-only orders are a placement precondition. Every other breach selects Halted, because a venue that clamps reduce-only at fill time would still fill against no position.

The state recorded in CommandApplied and SafeStateDriven is the state read back after the change, not the state requested.

Released under the Apache License 2.0.