Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cancelling

mostro-cli --output json order cancel --order <id> --yes

What happens depends on the order’s state and who you are; the node decides and data.result tells you.

resultSituationThen
canceledTypically your own order still pending, or a trade the node can cancel outrightDone. Local status canceled
cancel_requestedA trade in progress: you asked for a cooperative cancelnext_step: wait_for_peer_cancel. The counterparty must run order cancel too
cancel_acceptedThe counterparty had already requested itDone. Local status cooperatively-canceled; the hold invoice is returned to the seller

Cooperative cancel between two programs

A: order cancel --order X  → ok, result cancel_requested, next_step wait_for_peer_cancel
B: (sees a message from the node about the request; order info shows the trade still running)
B: order cancel --order X  → ok, result cancel_accepted

If the counterparty does not agree, the trade continues; a dispute (human-only today) is the escalation path.

Refusals

node_refused with reasons such as order_already_canceled, invalid_order_status (the order is in a status where the node does not allow this cancel) or invalid_peer.

Examples

See order cancel.