Skip to content

Skip IBKR fractional orders below API minimum - #62

Merged
Pigbibi merged 1 commit into
mainfrom
fix/ibkr-fractional-min-quantity
May 15, 2026
Merged

Skip IBKR fractional orders below API minimum#62
Pigbibi merged 1 commit into
mainfrom
fix/ibkr-fractional-min-quantity

Conversation

@Pigbibi

@Pigbibi Pigbibi commented May 15, 2026

Copy link
Copy Markdown
Collaborator

Prevent IBKR API rejections for tiny fractional orders by skipping orders that floor below roughly 0.01 shares. This keeps TQQQ-sized fractional orders working while avoiding 10243 on very small QQQ-like residuals.\n\nValidation:\n- ./.venv/bin/python -m pytest tests/test_execution_service.py -q -k 'fractional_buy or fractional_orders_below_ibkr_minimum_quantity'\n- ./.venv/bin/python -m py_compile application/execution_service.py tests/test_execution_service.py application/ibkr_order_execution.py

@Pigbibi
Pigbibi merged commit e7b3ff6 into main May 15, 2026
1 check passed
@Pigbibi
Pigbibi deleted the fix/ibkr-fractional-min-quantity branch May 15, 2026 01:29

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

Copy link
Copy Markdown

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: 345fb93182

ℹ️ 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".

Comment on lines +774 to +778
execution_summary["orders_skipped"].append(
{
"symbol": symbol,
"side": "buy",
"reason": "fractional_quantity_too_small",

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 Defer fractional-skip logging until execution phase

Logging orders_skipped in the planning pass causes duplicate skip records whenever at least one other symbol makes the rebalance executable. In that case this symbol is appended here, then appended again in the later buy/sell execution loops when it is re-evaluated and skipped for the same reason, which inflates skip counts and can mislead downstream monitoring/reporting that treats each entry as a distinct skipped order.

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