fix: preserve SOR execution venue separately

This commit is contained in:
Hermes Agent
2026-08-19 12:48:05 +09:00
parent 15aeae6930
commit 7366cadf03
15 changed files with 126 additions and 17 deletions
+5
View File
@@ -31,6 +31,9 @@ class _Order:
self.side = req.side
self.symbol = req.symbol
self.qty = req.qty
# Deterministic SOR simulation: paper routes SOR to KRX while retaining
# req.venue on the acknowledgement as submission provenance.
self.execution_venue = "KRX" if req.venue == "SOR" else req.venue
self.price = float(req.limit_price) if req.limit_price is not None else 1000.0
self.polls = 0
self.filled = 0
@@ -118,11 +121,13 @@ class PaperBroker:
return FillStatus(
state="filled", filled_qty=o.filled, avg_price=o.price,
execution_id=execution_id, fee=fee, tax=tax,
execution_venue=o.execution_venue,
)
return FillStatus(
state="partially_filled",
filled_qty=o.filled,
avg_price=o.price,
execution_venue=o.execution_venue,
raw={"order_open_confirmed": True},
)