Cancel Order
tronsave_cancel_orderCancel an open order by orderId. Returns the cancelled order payload after the status flip. Side effect: marks the order non-matchable and refunds locked balance per backend rules; effectively destructive on the live order. Idempotent — cancelling an already-cancelled order is a no-op success. Fails for fulfilled orders or unauthorized callers. Requires a signature session and mcp-session-id. Verify state with tronsave_get_order first; prefer tronsave_update_order when only price/receiver should change.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| orderId | Yes | Target order id (`MObjectId`) to cancel. Must be an active order owned/authorized by the current session; already-fulfilled or already-cancelled orders are expected to fail. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | GraphQL mutation status code (HTTP-like; `0`/`200` indicates success). Always pair with `success` for routing. | |
| message | Yes | Human-readable status text. Populated even on success; localized error messages may appear here on failure. | |
| success | Yes | Whether the mutation succeeded at the backend level. Always check this before reading `data`. |