Skip to content

Route IBKR live orders by account group#55

Merged
Pigbibi merged 1 commit into
mainfrom
ibkr-live-account-routing
May 10, 2026
Merged

Route IBKR live orders by account group#55
Pigbibi merged 1 commit into
mainfrom
ibkr-live-account-routing

Conversation

@Pigbibi
Copy link
Copy Markdown
Collaborator

@Pigbibi Pigbibi commented May 10, 2026

Summary

  • update QuantPlatformKit pin to the account-aware IBKR routing release
  • pass account group UID into portfolio reads, pending/fill guards, and submitted IBKR orders
  • fail fast when a runtime service tries to submit real orders for multiple account ids
  • document one Cloud Run service per live IBKR UID

Tests

  • PYTHONPATH=.:../QuantPlatformKit/src .venv/bin/ruff check --exclude external .
  • PYTHONPATH=.:../QuantPlatformKit/src .venv/bin/python -m pytest -q tests/test_ibkr_order_execution.py tests/test_execution_service.py tests/test_runtime_config_support.py tests/test_runtime_composer.py

@Pigbibi Pigbibi force-pushed the ibkr-live-account-routing branch from 000418f to bdff227 Compare May 10, 2026 15:39
@Pigbibi Pigbibi merged commit bd7c655 into main May 10, 2026
1 check passed
@Pigbibi Pigbibi deleted the ibkr-live-account-routing branch May 10, 2026 15:40
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 000418fa6f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

safe_haven_symbol = safe_haven_symbols[0] if safe_haven_symbols else None
equity = account_values.get("equity", 0)
normalized_account_ids = _normalize_account_ids(account_ids)
order_account_id = _resolve_order_account_id(normalized_account_ids)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reject multi-account IDs only when submitting real orders

execute_rebalance now calls _resolve_order_account_id at function start, so any account_ids with more than one value raises ValueError even in dry_run_only=True runs or other early-exit paths where no order would be sent. That regresses dry-run/validation workflows for multi-account groups and does not match the stated behavior of failing when the service actually attempts real order routing; the check should be deferred to the non-dry-run submission path (or gated by a live-order mode flag).

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant