Skip to content

Add trailing stop orders activation_price support for Rust #2750

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

Merged
merged 2 commits into from
Jul 3, 2025
Merged

Conversation

nicolad
Copy link
Collaborator

@nicolad nicolad commented Jul 2, 2025

# Concern / Feature Cython status (prod.) Rust status after PR Rust unit-tests present?
1 activation_price field on TrailingStopMarketOrder ✅ (#2610) ✅ (struct field, getter, has_activation_price) ✅ (trailing_stop_market init tests)
2 activation_price field on TrailingStopLimitOrder ✅ (trailing_stop_limit init tests)
3 is_activated + set_activated() logic on both trailing types ✅ (new flag & method) ✅ (activation path covered)
4 Order-trait accessor activation_price() n/a (Python only) ✅ (trait extended) 🟡 (trait exercised via concrete orders)
5 StopOrderAny::stop_px() returns activation_price fallback n/a ✅ (method patched) ✅ (stop_px parity check)
6 Matching-core skips stop-trigger until order activated ✅ (match_stop_order guard) ✅ (core unit-tests)
7 Matching-engine auto-sets activation px from market if None ✅ (maybe_activate_trailing_stop)
8 trailing_stop_calculate() signature now accepts activation price ✅ (extra param) ✅ (calc tests)
9 Order-emulator mirrors engine logic for activation & trailing move ✅ (updated method) 🟡 (covered indirectly)
10 Display / Debug output includes activation_price ✅ (str/repr tests) ✅ (fmt changes) ✅ (string/repr tests)

#2635

@nicolad nicolad requested a review from cjdsellers July 2, 2025 18:57
@nicolad nicolad self-assigned this Jul 2, 2025
@nicolad nicolad added the rust Relating to the Rust core label Jul 2, 2025
Copy link
Member

@cjdsellers cjdsellers left a comment

Choose a reason for hiding this comment

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

Thanks for all of this work @nicolad!

@nicolad nicolad force-pushed the 2635 branch 2 times, most recently from e727b44 to 1e6b4f9 Compare July 3, 2025 06:55
@nicolad nicolad requested a review from cjdsellers July 3, 2025 06:58
@cjdsellers cjdsellers merged commit 55784e5 into develop Jul 3, 2025
13 checks passed
@cjdsellers cjdsellers deleted the 2635 branch July 3, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Relating to the Rust core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants