Refactor execution boundaries and add durable strategy recovery

This commit is contained in:
Boki 2026-10-21 12:23:43 -04:00
parent d6b09eb635
commit 694c48bbdb
36 changed files with 3077 additions and 491 deletions

View file

@ -36,6 +36,11 @@ export interface ExecutionReport {
timestamp: number;
strategyId?: string;
}
/** A committed order report and only the new fills from that transaction. */
export interface ExecutionChange {
report: ExecutionReport;
fills: Fill[];
}
export interface Position {
symbol: string;
quantity: number;
@ -51,6 +56,10 @@ export interface Quote {
eventId: string;
}
export interface Account {
/** Account-row-locked journal sequence, safe integer checked before increment. */
strategySequence?: number;
inputSequence?: number;
admittedTimes?: Record<string, number>;
initialCapital: number;
cash: number;
realizedPnl: number;