Refactor execution boundaries and add durable strategy recovery
This commit is contained in:
parent
d6b09eb635
commit
694c48bbdb
36 changed files with 3077 additions and 491 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue