Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion application/execution_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ def _iter_open_orders(ib) -> list[Any]:
def _extract_open_order_symbol(order_like: Any) -> str | None:
contract = getattr(order_like, "contract", None)
if contract is None and hasattr(order_like, "order"):
contract = getattr(order_like, "contract", None)
contract = getattr(order_like.order, "contract", None)
symbol = getattr(contract, "symbol", None)
if symbol is None and hasattr(order_like, "symbol"):
symbol = getattr(order_like, "symbol")
Expand Down
25 changes: 0 additions & 25 deletions application/rebalance_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,22 +65,6 @@ def _localize_notification_text(text: str, *, translator) -> str:
)


def _render_notification_context_text(
notification_context: Mapping[str, object] | None,
*,
translator,
fallback: str = "",
) -> str:
if not isinstance(notification_context, Mapping):
return fallback
key = str(notification_context.get("code") or "").strip()
if not key:
return fallback
params = dict(notification_context.get("params") or {})
rendered = translator(key, **params)
return fallback if rendered == key else str(rendered)


def _should_suppress_noop_notification(signal_metadata: Mapping[str, object] | None) -> bool:
metadata = signal_metadata if isinstance(signal_metadata, Mapping) else {}
no_op_reason = str(metadata.get("no_op_reason") or "").strip()
Expand Down Expand Up @@ -121,15 +105,6 @@ def _resolve_reconciliation_mode(
return _normalize_reconciliation_mode(getattr(config, "execution_mode", None), fallback="paper")


def _translate_snapshot_guard_decision(decision: object, *, translator) -> str:
value = str(decision or "").strip()
if not value:
return ""
key = f"snapshot_guard_decision_{value}"
translated = translator(key)
return value if translated == key else str(translated)


def _localize_timing_contract(contract: str, *, translator) -> str:
value = str(contract or "").strip()
if not value:
Expand Down