# 取消挂单操作指引

在买家撮合前主动撤销上架中的挂单并将资产取回至个人钱包。

> Source: bitcoinuniverseio/stampdex (private application source), orders cancel route, wallet action challenge. Applicable release continuous deployment, verify with GET /api/version. Last verified 2026-09-01. Chain bitcoin/mainnet.

> [!NOTE]
> **简体中文官方文档**：构建撤单扫除交易并广播至比特币内存池的详细步骤。 核心交易规则为非托管模式，买卖双方按标准费率收取服务费，并于比特币主网进行原子结算。



**For:** a seller with a live listing.
**Goal:** the listing off the book, tokens back under your sole control.
**Chain and network:** Bitcoin mainnet. **Version:** continuous.

**Safety:** cancelling requires your signature. Nobody else can cancel your listing,
and StampDEX cannot cancel it for you without one.

## Prerequisites

- The wallet that created the listing, connected.
- The listing must not already have a payment against it.

## Steps

1. Open your [portfolio](/docs-stampdex/zh-cn/guides/portfolio/) or the token page and find
   the listing.
2. Choose to cancel.
3. Your wallet asks you to sign a short message. This is the one-time action challenge:
   it names the action, your address, and a hash of the exact request, and it can be
   used once. See [Review a 部分签名的比特币交易 (PSBT) before signing](/docs-stampdex/zh-cn/guides/psbt-review/).
4. The order moves to **Cancelled** and leaves the book.

## Expected result

The listing is gone from the book and from your open orders. Your tokens are yours
alone again.

## How to verify

```bash frame=none
curl "https://stamp.api.bitcoinuniverse.io/api/v1/orders/ORDER_ID"
```

The `status` reads `cancelled`.

## When cancelling is refused

| You see | What happened | What to do |
| --- | --- | --- |
| "Order already has a payment transaction and cannot be cancelled" | A buyer has paid | Nothing. Settlement owns the order now. Watch it reach Filled |
| "Order already has a payment transaction; settlement owns it now" | The same thing, said at a later point | Watch the order |
| "Order could not be cancelled, payment may have been submitted" | A payment arrived while you were cancelling | Refresh the order and read its state |
| "Wallet does not own this order" | You are connected as a different address | Connect the wallet that created the listing |
| "Wallet action challenge is invalid or expired" | The challenge outlived its five minute life | Try again. Nothing is stuck |

## Recovery path

A cancel that races a payment is decided in the payment's favour, deliberately: a buyer
who has already committed BTC is not left holding a cancelled order. If that happens,
the trade completes normally and you are paid.

## Related

- [Change a listing price](/docs-stampdex/zh-cn/guides/change-a-listing-price/)
- [Order lifecycle](/docs-stampdex/zh-cn/concepts/order-lifecycle/)