-
-
Notifications
You must be signed in to change notification settings - Fork 359
FIX: [xalign] interactive order enable flag #2367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a feature flag for interactive orders in the xalign strategy with automatic disabling when Slack interaction is not configured. The change introduces a getter method SlackInteractionEnabled() on the bbgo.Environment to check if Slack interaction is enabled, and adds the InteractiveOrderEnabled flag to the xalign strategy configuration to control whether orders require interactive Slack confirmation.
Key Changes
- New
SlackInteractionEnabled()getter method inbbgo.Environmentto expose the interactive Slack state - Added
InteractiveOrderEnabledconfiguration flag to the xalign strategy - Modified order placement logic to bypass interactive confirmation when the feature is disabled
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| pkg/bbgo/environment.go | Adds interactiveSlackEnabled field and SlackInteractionEnabled() getter to expose Slack interaction state |
| pkg/strategy/xalign/strategy.go | Adds InteractiveOrderEnabled configuration field and updates order placement logic to check if interactive orders are enabled |
| pkg/strategy/xalign/slack.go | Adds isInteractiveOrderEnabled() helper method and updates setupSlackInteractionCallback() to accept an enabled flag |
| pkg/strategy/xalign/slack_test.go | Updates test call to setupSlackInteractionCallback() with new signature |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
7397cc1 to
8433119
Compare
8433119 to
4dcbe67
Compare
InteractiveOrderEnabled