Skip to content

feat(orders): cancel a core's entry orders on the exchange (#1290) - #1490

Merged
guyverino merged 1 commit into
mainfrom
feat/exchange-entry-cancel
Nov 26, 2026
Merged

guyverino merged 1 commit into
mainfrom
feat/exchange-entry-cancel

Conversation

@guyverino

Copy link
Copy Markdown
Collaborator

What & why

Adds the exchange-wide entry cancellation requested in #1290: a Cancel entries on exchange button in the core settings popup, beside Cancel all orders. It calls MoonProto UI/63 once; the core fetches the open orders from the exchange and applies its own entry filter, so it also reaches orders the terminal's snapshot does not have.

  • moon-core: CoreCmd::CancelAllExchangeBuys, a live action routed once to trade().cancel_all_exchange_buys(). SessionManager::cancel_exchange_entries refuses an offline core and one that has not reported 7.73 N1 (CoreFeatures::exchange_buys_cancel). Nothing local is enumerated or cleared.
  • Core-settings popup: the button is disabled with the required version on older or unreported cores. Both cancel buttons share one armed confirmation slot (Shell::core_settings_armed replaces core_settings_cancel_confirm); the armed exchange confirmation names the core and is cleared if the core drops or loses N1. The toast says "sent", not "cancelled".

Notable decisions

  • Two-click armed confirmation, the same pattern as Cancel all orders in that popup, rather than a separate dialog.
  • The wording follows the SDK's scope: it does not promise "BUY orders only".

Known limitations

  • The button is in the regular core settings popup only, not in the expert window, the same as Cancel all orders.

Issues

Closes #1290

How to verify

cargo build -p moon-ui-gpui --bin moonterminal --target x86_64-pc-windows-msvc --all-targets
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-msvc -- -D warnings
cargo test --workspace --target x86_64-pc-windows-msvc

Local, after the rebase on 19127d094: fmt --check exit 0, build --all-targets exit 0, clippy --workspace --all-targets --locked -D warnings zero warnings, cargo test --workspace 10615 passed / 0 failed, doc-tests green.

- moon-core: CoreCmd::CancelAllExchangeBuys, a live action routed once to trade().cancel_all_exchange_buys() (MoonProto UI/63). SessionManager::cancel_exchange_entries refuses an offline core and one that has not reported 7.73 N1 (CoreFeatures::exchange_buys_cancel); nothing local is enumerated or cleared.

- Core-settings popup: a Cancel entries on exchange button beside Cancel all orders, disabled with the required version on older or unreported cores. Both share one armed confirmation slot (Shell::core_settings_armed replaces core_settings_cancel_confirm); the armed exchange confirmation names the core and is cleared if the core drops or loses N1. The toast says sent, not cancelled.

- Locale keys in all eight languages; theme_contract follows the renamed click handler.

Refs #1290
@guyverino
guyverino merged commit 37ffa7d into main Nov 26, 2026
12 checks passed
@guyverino
guyverino deleted the feat/exchange-entry-cancel branch November 26, 2026 11:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a button for exchange-wide entry-order cancellation (MoonProto UI/63)

1 participant