> For the complete documentation index, see [llms.txt](https://docs.artinals.com/artinals-protocol/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.artinals.com/artinals-protocol/market-module/functions-and-entry-points/cancel-buy-offer.md).

# Cancel Buy Offer

Function:

```
public fun cancel_buy_offer<CURRENCY>(
    ledger: &mut TradeLedger,
    offer_id: ID,
    collection_cap: &CollectionCap,
    clock: &Clock,
    ctx: &mut TxContext
)

```

**Description:**

* Allows a buyer to **cancel their buy offer**.
* The locked payment is **returned to the buyer**.
* The buy offer is updated to **CANCELLED**.

**Validations:**

* Only the **buyer** can cancel the offer.
* The offer must **be open**.
