fifth version
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user