Skip to main content

Module state

Module state 

Expand description

Portfolio state types for the event-sourced reducer.

PortfolioState is the canonical derived state reconstructed by replaying the journal. Serialization is deterministic (sorted keys) to support state hashing.

Structs§

BalanceKey
Key for balance lookup: (venue_id, asset).
Order
A tracked order in the engine state.
PendingIntent
Cached intent data for constructing an Order when ExecutionAck arrives.
PnlSnapshot
A single realized P&L snapshot for velocity gate evaluation.
PortfolioState
Top-level derived state maintained by the reducer.
Position
A position on a specific venue + instrument.
PositionKey
Key for position lookup: (venue_id, instrument_id).
ReconcileTracking
Per-scope reconciliation tracking embedded in PortfolioState.
ScopeReconcileStatus
Status of the most recent reconciliation for a single scope.
StrategyPnl
Per-strategy realized P&L counters.
TerminalOrderAttribution
Attribution retained for orders that were locally terminalized before the venue finished delivering their final lifecycle events.

Enums§

VelocityGateLevel
Velocity gate level (orthogonal to RiskStopState).

Type Aliases§

FillDedupKey
Stable dedup key for fills: (venue_order_id, fill_id).