> For the complete documentation index, see [llms.txt](https://niftix.gitbook.io/niftix-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://niftix.gitbook.io/niftix-docs/getting-started/cancel-expire-withdraw.md).

# Cancel, expire & withdraw

On a swap page (`/swap/[id]`) you may see different actions depending on your role and status.

## Cancel Offer

* **Who:** Usually the **creator**
* **When:** Until the counterparty deposits any requesting asset (you can still cancel after they accept, as long as they have not deposited)
* **Effect:** Swap moves toward **Cancelled** on-chain; creator can withdraw deposited offering assets

Use Cancel if you change your mind while the offer is still waiting.

## Expire Offer

* **Who:** A **participant** (creator or receiver) when the deadline has passed
* **When:** After expiry, while the escrow account still needs an on-chain expire step
* **Effect:** Marks the swap expired so recovery / withdraw can proceed

Niftix does not always auto-expire silently for every case — you may need to click **Expire Offer**.

## Withdraw My Assets

* **Who:** Whoever still has deposited assets in escrow after cancel / expire (or other recoverable terminal states)
* **When:** UI shows **Withdraw My Assets** after the swap is no longer active for trading
* **Effect:** Returns your deposited assets from the vault to your wallet (and may close the escrow account / reclaim rent when empty)

## Execute Swap (separate button)

Sometimes accept deposits but does **not** finish settle in the same click (large txs, size limits, or interrupted flow). If status is **Ready**, use **Execute Swap** to settle.

## Checklist

1. Confirm you are the right wallet (creator vs receiver).
2. Prefer Explorer + wallet balances if the UI badge is lagging.
3. Never share seed phrases while recovering funds.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://niftix.gitbook.io/niftix-docs/getting-started/cancel-expire-withdraw.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
