feat: resolve and persist actual order venue

This commit is contained in:
jordan
2026-07-29 17:10:32 +09:00
parent 6398ff250c
commit a656350a35
18 changed files with 304 additions and 47 deletions
+6 -1
View File
@@ -201,7 +201,11 @@ class ExecutionService:
)
)
if ack.accepted and ack.broker_order_id:
self._repo.mark_dispatched(slot.slot_id, ack.broker_order_id)
self._repo.mark_dispatched(
slot.slot_id,
ack.broker_order_id,
venue=ack.venue,
)
r.dispatched += 1
if ack.reason and ack.reason.startswith("submit_outcome_unknown:"):
_log.warning(
@@ -643,6 +647,7 @@ class ExecutionService:
fee=float(fs.fee),
tax=float(fs.tax),
executed_at=datetime.now(tz=timezone.utc),
venue=slot.venue,
)
self._ledger_outbox.enqueue(trade)
r.ledger_enqueued += 1