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§
- Balance
Key - Key for balance lookup: (venue_id, asset).
- Order
- A tracked order in the engine state.
- Pending
Intent - Cached intent data for constructing an
OrderwhenExecutionAckarrives. - PnlSnapshot
- A single realized P&L snapshot for velocity gate evaluation.
- Portfolio
State - Top-level derived state maintained by the reducer.
- Position
- A position on a specific venue + instrument.
- Position
Key - Key for position lookup: (venue_id, instrument_id).
- Reconcile
Tracking - Per-scope reconciliation tracking embedded in
PortfolioState. - Scope
Reconcile Status - Status of the most recent reconciliation for a single scope.
- Strategy
Pnl - Per-strategy realized P&L counters.
- Terminal
Order Attribution - Attribution retained for orders that were locally terminalized before the venue finished delivering their final lifecycle events.
Enums§
- Velocity
Gate Level - Velocity gate level (orthogonal to
RiskStopState).
Type Aliases§
- Fill
Dedup Key - Stable dedup key for fills: (venue_order_id, fill_id).