Namespace Virtufin.Base.Events.Position
Classes
- PositionEvent<T>
Sealed algebraic data type of position events. The unified stream driving all holdings changes — funding, deposits, withdrawals, AND fills (a fill produces two PositionEvent<T>.Updated events atomically, one per side of the trade). Topics use the naming scheme
sc.{scenarioId}.position.{entity}.{event}.
- PositionEvent<T>.Closed
Net quantity reached zero — position closed.
- PositionEvent<T>.Flipped
Direction changed atomically (long ↔ short).
- PositionEvent<T>.Opened
First fill on a flat symbol — opens a position.
- PositionEvent<T>.Updated
Quantity or avg-entry changed by a fill or transfer.
- RichPositionEvent<T>
Enriched position events — same IPositionEvent<T> marker as PositionEvent<T> but with attribution, party info, and a pass-through case for the raw event. Use this when consumers need to know who initiated the change (e.g. transfer counterparty info).
- RichPositionEvent<T>.Base
Pass-through wrapper for a raw PositionEvent<T>.
- RichPositionEvent<T>.OpenedWithParty
Position opened with from/to party info (e.g. transfer counterparty).
- RichPositionEvent<T>.UpdatedAttributed
Position updated with attribution.
Enums
- Direction
Direction of a position.
- PositionSource
Originating source of a position event.