# Repay the debt of your margin position

**User Guide**

* **Navigate to the market** where you hold an active margin position. Scroll down to the **Your Position** panel.
* Click the **three dots (⋮)** next to your position. This opens the advanced options menu.

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

* Select **Repay Debt from Wallet**. A pop-up will appear showing your current debt and the option to repay it.

<figure><img src="/files/wQOHUctBQ4dyasmv5NNd" alt="" width="375"><figcaption></figcaption></figure>

* **Enter the amount** of SOL you want to repay.
  * The panel displays:
    * **Currently borrowed** and **New net borrow amount**
    * **Open Debt**
    * **Collateral balance**
    * **Estimated liquidation price**
    * **Leverage**
* Click **Repay Debt** and confirm the transaction in your wallet. Your position will update with a reduced or cleared debt amount.

***

### Important Information

* **Debt Reduction First**: Repayments always reduce open debt before profit can be realized.
* **Lower Risk**: Repaying debt lowers your effective leverage and improves liquidation safety.
* **Partial or Full Repayment**: You can repay a portion or the full debt, depending on your wallet balance.
* **Wallet Balance Needed**: You must hold enough SOL in your wallet to cover the repayment.


---

# 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/margin-position-management/repay-the-debt-of-your-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.
