Skip to content

Fix combo update grouped-order retrieval in IBPlaceOrder#218

Draft
creatidy wants to merge 1 commit intoQuantConnect:masterfrom
creatidy:bug-217-combo-update-group-retrieval
Draft

Fix combo update grouped-order retrieval in IBPlaceOrder#218
creatidy wants to merge 1 commit intoQuantConnect:masterfrom
creatidy:bug-217-combo-update-group-retrieval

Conversation

@creatidy
Copy link
Copy Markdown

Description

Adjusts IBPlaceOrder grouped-order retrieval behavior:

  • For new submissions (needsNewId == true): keep current cache-based grouped retrieval.
  • For updates (needsNewId == false): retrieve grouped orders from _orderProvider.GetOrderById(...) so a single-leg update request can reliably reconstruct the full combo group.

Related Issue

#217

Motivation and Context

Combo updates may arrive through one leg/ticket context, where transient cache-based grouped retrieval is insufficient.
This can cause update-path misses and inconsistent combo update behavior.

Using order-provider-based group reconstruction on updates makes update handling reliable and deterministic.

Requires Documentation Change

No.

How Has This Been Tested?

  • Build validation:
    • dotnet build /tmp/ib-pr/QuantConnect.InteractiveBrokersBrokerage/QuantConnect.InteractiveBrokersBrokerage.csproj --no-restore
  • Also validated with LEAN-side targeted regression tests tied to the companion issue:
    • BrokerageTransactionHandlerTests.ProcessesComboRequestsOnSameThreadWhenConcurrencyIsEnabled
    • BrokerageTransactionHandlerTests.ProcessesOrdersConcurrently

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Checklist:

  • My code follows the code style of this project.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My branch follows the naming convention bug-<issue#>-<description>

Additional note for tests:
This repository does not currently include a focused unit-test harness for this specific grouped update-path edge case in this change set, so coverage is validated by successful build plus companion LEAN regression tests.

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