Warn when limit/stop increase may be liquidatable at trigger price FEDEV-2399#2582
Open
qwinndev wants to merge 6 commits into
Open
Warn when limit/stop increase may be liquidatable at trigger price FEDEV-2399#2582qwinndev wants to merge 6 commits into
qwinndev wants to merge 6 commits into
Conversation
Deploying gmx-interface-home with
|
| Latest commit: |
2762a7f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://de55c0bd.gmx-interface-home.pages.dev |
| Branch Preview URL: | https://fedev-2399-liquidatable-incr.gmx-interface-home.pages.dev |
Deploying gmx-interface with
|
| Latest commit: |
2762a7f
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://330574df.gmx-interface.pages.dev |
| Branch Preview URL: | https://fedev-2399-liquidatable-incr.gmx-interface.pages.dev |
…rigger price - yellow non-blocking warning in the tradebox and order editor, red critical error in the order list Type column - flags only orders whose position survives to the trigger: a trigger beyond the current liq price means the position is liquidated first and the order then opens a new position, so it is not flagged - orders with no existing position are checked against the standalone position they would open - the market-increase liquidation block in getIncreaseError is scoped to market orders (resting limit/stop orders are handled by the warning)
4ea9f3e to
4290e46
Compare
…osition limit/stop increases
…99-liquidatable-increase-warning
divhead
previously approved these changes
Jul 7, 2026
…table-increase-warning # Conflicts: # src/domain/synthetics/trade/utils/__tests__/validation.spec.ts
Playwright Component Test ReportAll tests passed. Commit 2762a7f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flags Limit Increase / Stop Increase orders that would leave the resulting position liquidatable at the trigger (execution) price, so the user knows upfront that the order cannot execute.
Linear: https://linear.app/gmx-io/issue/FEDEV-2399
Behavior
!isLimit); resting limit/stop orders get the non-blocking treatment above.Changes
getIsPositionLiquidatableAtPriceshared helper (+ unit tests).selectTradeboxIncreaseLiquidationRiskWarningselector;LiquidatableIncreaseWarningCardshared by the tradebox and the order editor.getOrderErrors:resultingLiquidatablecritical for Limit/Stop Increase orders, simulated viamakeSelectOrderEditorNextPositionValuesForIncreaseat the order trigger price (+ unit tests).