fifth version

This commit is contained in:
2026-06-08 09:03:37 +00:00
parent b9efa98758
commit 2d57c4ff1f
26 changed files with 896 additions and 159 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ func (m Manager) OnEntryFill(ctx context.Context, accountIDHash string, instrume
Lot: lot,
AvgBuyPrice: order.AvgFillPrice,
CommissionTotal: order.Commission,
Status: domain.PositionHoldingOvernight,
Status: domain.PositionEntryFilled,
OpenedAt: &now,
UpdatedAt: now,
}
+3
View File
@@ -28,6 +28,9 @@ func TestOnEntryFillKeepsBuyCommission(t *testing.T) {
if !pos.CommissionTotal.Equal(decimal.NewFromInt(3)) {
t.Fatalf("commission=%s, want 3", pos.CommissionTotal)
}
if pos.Status != domain.PositionEntryFilled {
t.Fatalf("status=%s, want ENTRY_FILLED", pos.Status)
}
}
func TestOnExitFillPartialUsesExecutedLots(t *testing.T) {