# Trading

## 🚀 Opening a position with leverage

{% stepper %}
{% step %}

#### First, navigate to [Lavarage](https://app.lavarage.xyz/). You’ll see the following screen upon arrival

<figure><img src="/files/nm3s9uW912UJB3WcyG6V" alt=""><figcaption><p>Be sure to check out the platform on mobile through our smooth mobile-first UI design.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Next, choose any token you want to trade with leverage

<figure><img src="/files/YbJtCuheDhq3ymFut33v" alt=""><figcaption><p>Tokens are sorted by new and popularity. Search for specific tokens using name or CA.</p></figcaption></figure>
{% endstep %}

{% step %}

#### Enter the quote currency amount and select the leverage multiplier

<div align="left"><figure><img src="/files/ocqrGjL1vo58dg4UoNzZ" alt=""><figcaption><p>Start with smaller trade sizes to familiarize yourself with the platform features.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### The Loan Summary contains details such as the total Position Size, Est. Entry Price, and Fees

<div align="left"><figure><img src="/files/3zhKkltV5n3Yrd8TC983" alt=""><figcaption><p>Everything you need to know before opening your position.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Review the Price Impact Analysis to get a more accurate Entry Price indicator

<div align="left"><figure><img src="/files/SPaTaWaNIDAEi0QeYV9r" alt=""><figcaption><p>Understand price impact before confirming your trade.</p></figcaption></figure></div>
{% endstep %}

{% step %}

#### Now hit the "Confirm Trade" button and watch the magic unfold ✨!

Once the trade is executed in your wallet app, you can view and actively monitor your positions in real time.

<figure><img src="/files/b0o59jfp8ogiN2ZVK3jl" alt=""><figcaption><p>View key details for each position including LTV, PnL, entry price, and current price.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

***

## Closing your position

There are multiple options to **Close** your entire position.

1. 💰 **Sell**
2. **💵 Repay**
3. **📈 Take Profit**

### 💰 Sell

The first way is by selling your position in one-go. As the trader, you can choose to sell the collateral that is locked in the smart contract to receive SOL/USDC. If the token’s price has increased since you opened the position, you'll realize a profit.

{% stepper %}
{% step %}

#### Simply select the "Close" button on any of your open positions and review the Price Impact Analysis to get a more accurate Exit Price indicator

<figure><img src="/files/Vrdxz2DHmyPyCmKS7gLC" alt=""><figcaption><p>Upon closing, you'll repay the interest, fees, and borrowed amount.<br>Any profit above these costs is returned to your wallet.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

### **💵** Repay

The second option to close your position is **Repay**. In this case, you repay the outstanding loan to the smart contract, which includes the SOL/USDC borrowed earlier plus any accrued interest.

Once repaid, the tokens locked in the smart contract are released and sent to your wallet. This option allows you to retain your position tokens to hold after repayment, safely stored in your own wallet without converting them back to SOL/USDC.

{% stepper %}
{% step %}

#### Select the "Repay" button on any of your open positions

<figure><img src="/files/jzTMJO6HIiX2dyv4ICtv" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

#### Ensure the 100% option is selected before confirming

<div align="left"><figure><img src="/files/g6alBth3LAig3g2gmotS" alt=""><figcaption><p>After approving the wallet transaction,<br>the tokens locked in the smart contract will be released and send to your wallet.</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### **📈 Take Profit**

The third option is Take Profit, which allows you to automatically close your position when your token reaches a target price you set in advance. Once your target price is hit, the system will attempt to sell your collateral and close the position for you, locking in your gains without requiring you to manually monitor and execute the trade.

***Note:** This feature is currently in BETA. Take Profit orders are executed on a best-effort basis and are not guaranteed. Please monitor your position closely, as there is a possibility that the Take Profit order may not be filled.*

{% stepper %}
{% step %}

#### Select the "Set TP" button on any of your open positions

<div align="left"><figure><img src="/files/bhxKcsyX5E8H6kCYYiXd" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Set the desired percentage for your Take Profit and select "Set TP"

<div align="left"><figure><img src="/files/ZyijXAQWvz602C7mZawo" alt=""><figcaption><p>To update or remove your Take Profit target, click "Set TP" again<br>and adjust your target price or clear it to cancel the order.</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

***

## Managing your position

There are multiple options to Manage your position.

1. **💴 Partial Sell** - Split position and sell a portion of your collateral while keeping the remaining position active
2. **💶 Partial Repay** - Reduce leverage by partially repaying loan
3. **➗ Split** - Divide position into multiple separate positions

### **💴 Partial Sell**

Partial Sell allows you to close a portion of your position while keeping the rest active. You can sell a percentage of your collateral, converting it back to SOL/USDC, while the remaining tokens stay locked in the smart contract.

{% stepper %}
{% step %}

#### Select the "Partial Sell" button

<div align="left"><figure><img src="/files/FdbfRcMCxxbIMd4qAkqc" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Select the desired percentage and hit Confirm

<div align="left"><figure><img src="/files/Eq7bhursNujWrCxSaLqN" alt=""><figcaption><p>Partial Sell proportionally repays your loan balance and fees based on the percentage sold.</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### **💶 Partial Repay**

Partial Repay allows you to reduce your loan balance while keeping your position active. By repaying a percentage of the borrowed amount plus accrued interest, you lower your liquidation risk and improve your loan-to-value (LTV) ratio.

{% stepper %}
{% step %}

#### Select the "Repay" button

<div align="left"><figure><img src="/files/5iuL9tp3pfKWayaQK2Io" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Select the desired percentage and hit Confirm

<div align="left"><figure><img src="/files/ZfW238BXHjlUtQr3rhec" alt=""><figcaption><p>Partial Repay requires a minimum repayment amount<br>and cannot reduce the loan balance below the minimum threshold.</p></figcaption></figure></div>
{% endstep %}
{% endstepper %}

### **➗ Split**

Split allows you to divide your existing leveraged position into two separate positions based on a ratio you specify. Once split, each position operates independently—you can choose different actions for each, such as selling one while keeping the other open. This gives you greater flexibility in managing your position without having to close everything at once.

{% stepper %}
{% step %}

#### Select the Split button

<div align="left"><figure><img src="/files/AMZkn5DmgbDUe53ImHp3" alt=""><figcaption></figcaption></figure></div>
{% endstep %}

{% step %}

#### Select the desired split ratio and press the Split Position button

<div align="left"><figure><img src="/files/mS1aUmZX70UAzNjj9lDj" alt=""><figcaption></figcaption></figure></div>
{% endstep %}
{% endstepper %}

***

### 🔒 Closed Positions

Last but not least, under the **Closed** tab, you can view all your historical closed positions. Here, you'll find details such as the exact date the position was opened, the Entry Price, initial Position Size, and the leverage multiplier used.

<div align="left"><figure><img src="/files/gwwGjaWf2ENxtX9O0d4c" alt=""><figcaption></figcaption></figure></div>

### Status Explained

{% stepper %}
{% step %}

#### 💰 Sold

Closed by selling the collateral back to SOL/USDC. The sale converted your tokens at market price, and you received the proceeds minus the borrowed amount, interest, and fees.
{% endstep %}

{% step %}

#### 📈 Sold by TP

Position automatically closed when your Take Profit target price was reached. The system executed the sale on your behalf, locking in your profits at the price level you set.
{% endstep %}

{% step %}

#### 💵 Repaid

Position closed by repaying the full borrowed amount plus accrued interest. Your tokens were released from the smart contract and sent to your wallet without selling them. This can occur through:

* Full Repay
* Original position closed after being Split or Partial Sell
  {% endstep %}

{% step %}

#### 🌊 Liquidated

Position automatically closed because the liquidation LTV threshold was reached. The collateral was sold to repay the loan, protecting the lender from losses.
{% endstep %}
{% endstepper %}


---

# 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://lavarage.gitbook.io/lavarage/platform/trading.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.
