# Close a margin position

### User Guide

* **Navigate to the market** where you hold an open trade. At the bottom panel under **Your Position**, you will see your active trade details.
* To close your position fully, click **Close Trade** in the position panel. Confirm the transaction in your wallet. This will exit 100% of your position.

<figure><img src="/files/DLGLtvSpZnrVDYLVAS4E" alt="" width="563"><figcaption></figcaption></figure>

* To close partially, go to the **Close Position** tab in the trading matrix. Here, you can select how much of your position to sell.
  * Use the predefined buttons: **25%, 50%, 75%, 100%, o**r click **Max** to close the full amount
  * The position size, leverage, open debt, and PnL will update in real time as you adjust

<figure><img src="/files/r3zUVlfGFPEbaf3FrjPU" alt="" width="563"><figcaption></figcaption></figure>

* Review the updated trade metrics:
  * **Position Size**: Remaining tokens after partial close
  * **Net Leverage**: Adjusts dynamically after reducing exposure
  * **Open Debt**: Partial exits repay debt before profits are realized
  * **Slippage**: You can adjust slippage settings (default max: 1%)
* Click **Close Position** and confirm the transaction in your wallet. Your position is now closed (partially or fully), and updates will appear in the dashboard.

***

### Important Information

* **Partial Exits Repay Debt First**: Any open debt is automatically repaid before profits are realized when you close part of a position.
* **Leverage Adjustment**: Closing a portion of your position lowers exposure and may reduce effective leverage.
* **Debt-Free Exits**: If all open debt is repaid, remaining proceeds count as profit/loss directly.
* **Slippage Management**: Set slippage tolerance to avoid failed transactions in volatile markets


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sendit.fun/getting-started/tutorials/margin-trading/close-a-margin-position.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
