Skip to content

Conversation

@Romazes
Copy link
Collaborator

@Romazes Romazes commented Feb 10, 2026

Description

Notify user that they can handle Outside Lean Orders in their algorithm by implementing specific logic or even simply skipping.

Ignoring unrecognized order (BrokerId: {brokerageOrderId}). Please use 'SetBrokerageMessageHandler(...)' to set a custom brokerage message handler to optionally accept unknown orders.

Related PRs

Related Issue

N/a

Motivation and Context

We have added this message, and it will apply to all brokerages and will be protected from duplication.

Requires Documentation Change

N/a

How Has This Been Tested?

Run the algo without SetBrokerageMessageHandler(...) and see the warning message.

image

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> or feature-<issue#>-<description>

Add a warning in DefaultBrokerageMessageHandler to notify users when orders are placed manually through the brokerage and are not observed by Lean. The warning is emitted only once per session and includes a message with documentation guidance.
@Romazes Romazes self-assigned this Feb 10, 2026
@Romazes Romazes merged commit dfa3fd3 into QuantConnect:master Feb 11, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants