You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Full end-to-end Bracket Order feature on the desktop tradebox. A user clicks a new prominently-placed Bracket Order chip (labeled with the default percentages, e.g. 📈 Bracket Order · Auto TP 5% · SL 2.5%), which enables TP/SL mode and prefills both exit prices computed from the current reference price and order side. The existing TpSlSection expands inline with concrete prices, per-leg PnL, and the risk/reward bar. The user can edit either prefilled value or submit as-is; entry + TP + SL are placed atomically via Hyperliquid's existing normalTpsl grouping.
Scope covers:
New pure-function defaults calculator (deep module) with unit tests
New atomic store action that toggles the bracket on/off and writes/clears the two prices
New BracketToggle UI component
Removal of the existing TP/SL checkbox from the Reduce Only / TIF row
New dedicated row for the toggle, positioned between the size slider block and the Reduce Only / TIF row
i18n strings added to all six locales (en, es, fr, hi, zh, ar)
See the PRD's Implementation Decisions and Testing Decisions sections for the full module sketch and testing approach.
Acceptance criteria
Clicking the Bracket chip enables TP/SL mode and prefills both price inputs with concrete values computed from the current reference price
Default offsets are 5% for TP and 2.5% for SL, applied in the correct direction for long vs short
Prefilled prices respect the market's szDecimals rounding
Clicking the Bracket chip again (toggling off) clears both TP and SL values
Toggling off and then back on recomputes fresh defaults rather than restoring prior edits
Existing TP/SL validation (TP must be above entry for long, etc.) continues to apply
Existing R:R bar and per-leg PnL display automatically when Bracket is active
Submit uses the atomic normalTpsl grouping; entry + TP + SL are placed as one unit
The old TP/SL checkbox is removed; Reduce Only and TIF remain in their current row
Bracket chip is hidden when the current order type does not support TP/SL (spot, trigger, scale, TWAP)
Bracket chip is disabled when the wallet is not connected or the form is otherwise disabled
Bracket chip is focusable and activatable via keyboard (Enter/Space), with an accessible name announcing the on/off state
When switching markets while Bracket is active, the prefilled values recompute for the new reference price
Unit tests cover the defaults calculator: long/short direction, percentage math, decimal rounding, invalid inputs
Parent PRD
#93
What to build
Full end-to-end Bracket Order feature on the desktop tradebox. A user clicks a new prominently-placed Bracket Order chip (labeled with the default percentages, e.g.
📈 Bracket Order · Auto TP 5% · SL 2.5%), which enables TP/SL mode and prefills both exit prices computed from the current reference price and order side. The existingTpSlSectionexpands inline with concrete prices, per-leg PnL, and the risk/reward bar. The user can edit either prefilled value or submit as-is; entry + TP + SL are placed atomically via Hyperliquid's existingnormalTpslgrouping.Scope covers:
BracketToggleUI componentTP/SLcheckbox from the Reduce Only / TIF rowSee the PRD's Implementation Decisions and Testing Decisions sections for the full module sketch and testing approach.
Acceptance criteria
szDecimalsroundingnormalTpslgrouping; entry + TP + SL are placed as one unitTP/SLcheckbox is removed; Reduce Only and TIF remain in their current rowBlocked by
None - can start immediately
User stories addressed
Reference by number from the parent PRD: