> 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/accept-sell-offer.md).

# Accept Sell Offer

Function:

```
public fun accept_offer<CURRENCY>(
    ledger: &mut TradeLedger,
    offer_id: ID,
    mut payment: Coin<CURRENCY>,
    collection_cap: &CollectionCap,
    amount_to_buy: u64,
    clock: &Clock,
    ctx: &mut TxContext
)

```

**Description:**

* Allows a **buyer** to accept a sell offer.
* The buyer provides the **required amount** in `CURRENCY`.
* The **NFTs are transferred** to the buyer, and the seller receives payment.

**Validations:**

* The offer **must be open**.
* The buyer must **have enough funds**.
* The offer is **updated to FILLED or PARTIALLY FILLED** based on the purchase amount.
