feat: propagate intent venue through execution

This commit is contained in:
jordan
2026-07-29 16:55:20 +09:00
parent 7084304c9f
commit 479cb39a7e
22 changed files with 314 additions and 19 deletions
+5
View File
@@ -85,6 +85,7 @@ class SlotService:
# dcy-022 / REQ-068: execution policy (set on PENDING entry, cleared on exit).
timeout_sec: Optional[int] = None,
slippage_pct: Optional[float] = None,
venue: Optional[str] = None,
extra: Optional[dict[str, Any]] = None,
) -> Slot:
"""Transition slot from one state to another atomically.
@@ -133,6 +134,7 @@ class SlotService:
take_profit_price=take_profit_price,
timeout_sec=timeout_sec,
slippage_pct=slippage_pct,
venue=venue,
)
self._repo.update_slot(updated)
@@ -173,6 +175,7 @@ class SlotService:
take_profit_price: Optional[Decimal] = None,
timeout_sec: Optional[int] = None,
slippage_pct: Optional[float] = None,
venue: Optional[str] = None,
) -> Slot:
"""Compute the post-transition Slot row.
@@ -201,6 +204,7 @@ class SlotService:
take_profit_price=None,
timeout_sec=None,
slippage_pct=None,
venue="KRX",
updated_at=datetime.now(tz=timezone.utc),
)
@@ -267,6 +271,7 @@ class SlotService:
timeout_sec=new_timeout_sec,
slippage_pct=new_slippage_pct,
occupancy_seq=new_occupancy_seq,
venue=venue if venue is not None else slot.venue,
updated_at=datetime.now(tz=timezone.utc),
)