feat: propagate intent venue through execution
This commit is contained in:
@@ -197,6 +197,7 @@ class ExecutionService:
|
||||
qty=qty,
|
||||
limit_price=limit,
|
||||
order_type="00" if limit is not None else "01",
|
||||
venue=slot.venue,
|
||||
)
|
||||
)
|
||||
if ack.accepted and ack.broker_order_id:
|
||||
@@ -548,12 +549,14 @@ class ExecutionService:
|
||||
return
|
||||
qty = int(slot.qty or 0)
|
||||
try:
|
||||
accepted = self._broker.cancel_order(
|
||||
slot.broker_order_id,
|
||||
side=side,
|
||||
symbol=slot.symbol or "",
|
||||
qty=qty,
|
||||
)
|
||||
cancel_kwargs = {
|
||||
"side": side,
|
||||
"symbol": slot.symbol or "",
|
||||
"qty": qty,
|
||||
}
|
||||
if slot.venue != "KRX":
|
||||
cancel_kwargs["venue"] = slot.venue
|
||||
accepted = self._broker.cancel_order(slot.broker_order_id, **cancel_kwargs)
|
||||
r.timeout_cancelled += 1
|
||||
_log.warning(
|
||||
"timeout cancel sent: slot=%s status=%s broker_order_id=%s "
|
||||
@@ -665,12 +668,14 @@ class ExecutionService:
|
||||
side = "buy" if slot.status is SlotState.PENDING_BUY else "sell"
|
||||
qty = int(slot.qty or 0)
|
||||
try:
|
||||
self._broker.cancel_order(
|
||||
slot.broker_order_id,
|
||||
side=side,
|
||||
symbol=slot.symbol or "",
|
||||
qty=qty,
|
||||
)
|
||||
cancel_kwargs = {
|
||||
"side": side,
|
||||
"symbol": slot.symbol or "",
|
||||
"qty": qty,
|
||||
}
|
||||
if slot.venue != "KRX":
|
||||
cancel_kwargs["venue"] = slot.venue
|
||||
self._broker.cancel_order(slot.broker_order_id, **cancel_kwargs)
|
||||
except Exception: # noqa: BLE001 - best-effort
|
||||
_log.warning(
|
||||
"operator cancel failed: slot=%s broker_order_id=%s",
|
||||
|
||||
Reference in New Issue
Block a user