> ## Documentation Index
> Fetch the complete documentation index at: https://docs.limora.finance/llms.txt
> Use this file to discover all available pages before exploring further.

# Closing Trades

> How to close positions and realize profits or losses

Learn how to close your leveraged positions on Limora, whether to take profits, cut losses, or simply exit the market.

***

## Ways to Close a Position

Positions can be closed in several ways:

<CardGroup cols={2}>
  <Card title="Manual Close" icon="hand">
    Close at any time by clicking the close button on your active position.
  </Card>

  <Card title="Stop-Loss" icon="shield">
    Automatically closes when price hits your stop-loss level.
  </Card>

  <Card title="Take-Profit" icon="target">
    Automatically closes when price hits your take-profit level.
  </Card>

  <Card title="Liquidation" icon="triangle-exclamation">
    Automatically closes if margin falls below maintenance level.
  </Card>
</CardGroup>

***

## Manual Close

To manually close an open position:

<Steps>
  <Step title="Navigate to Trade Page">
    Go to the Trade page where your active positions are displayed.
  </Step>

  <Step title="Find Your Position">
    Locate the position you want to close in the Active Positions section.
  </Step>

  <Step title="Click Close">Click the "Close" button on the position row.</Step>

  <Step title="Confirm Details">
    Review the closing summary: - Current P\&L - Closing fee - Final amount to
    receive
  </Step>

  <Step title="Sign Transaction">Confirm the transaction in your wallet.</Step>

  <Step title="Settlement">
    Once confirmed, funds are returned to your trading balance: - Collateral ±
    P\&L - Fees
  </Step>
</Steps>

***

## Understanding Settlement

When you close a position, the settlement calculation is:

```
Final Amount = Collateral + P&L - Closing Fee - Accrued Interest
```

### P\&L Calculation

**For Long Positions:**

```
P&L = Position Size × (Exit Price - Entry Price) / Entry Price
```

**For Short Positions:**

```
P&L = Position Size × (Entry Price - Exit Price) / Entry Price
```

### Example Settlement

<Card title="Closing a Profitable Long">
  **Position Details:**

  * Entry Price: \$50,000
  * Position Size: 1,000 USDC
  * Collateral: 100 USDC
  * Exit Price: \$55,000 (+10%)

  **Calculation:**

  * P\&L: 1,000 × 10% = +100 USDC
  * Closing Fee: 1,000 × 0.1% = 1.00 USDC
  * Interest (24h): \~0.50 USDC

  **Final Amount:**
  100 + 100 - 0.80 - 0.50 = **198.70 USDC**
</Card>

***

## Automatic Closes

### Stop-Loss Execution

When price reaches your stop-loss level:

1. Oracle price triggers stop-loss condition
2. Position is queued for closure
3. Close executes at next available oracle update
4. Settlement processed automatically

<Note>
  In fast-moving markets, the actual close price may slightly differ from your
  stop-loss level due to oracle update timing.
</Note>

### Take-Profit Execution

When price reaches your take-profit level:

1. Oracle price triggers take-profit condition
2. Position is queued for closure
3. Close executes at next available oracle update
4. Profits settled to your trading balance

### Liquidation

When your margin falls below the maintenance requirement:

1. Position flagged for liquidation
2. Liquidator bot executes the close
3. Remaining collateral (if any) returned minus liquidation penalty
4. Matcher receives their funds plus any owed P\&L

<Warning>
  Liquidation typically results in loss of most or all of your collateral.
  Always use stop-losses to avoid liquidation.
</Warning>

***

## Partial Close

Currently, Limora supports full position closure only. To reduce position size:

1. Close the entire position
2. Open a new smaller position

Partial close functionality may be added in future updates.

***

## Closing Fees

Closing a position incurs a fee:

| Fee Type    | Rate | Applied To    |
| ----------- | ---- | ------------- |
| Closing Fee | 0.1% | Position Size |

**Example:**

* Position Size: 1,000 USDC
* Closing Fee: 1,000 × 0.0008 = 0.80 USDC

This fee is deducted from your final settlement.

***

## What Happens to the Matcher

When you close your position:

1. Your matcher's funds are unlocked
2. Matcher receives:
   * Their original collateral
   * Interest earned during the position
   * P\&L (opposite of your P\&L)

If you profited, the matcher lost (and vice versa). This is the fundamental mechanic of the peer-to-peer matching system.

***

## Viewing Closed Positions

After closing, find your trade in:

* **Trade History**: Complete record of all past trades
* **Analytics**: Performance metrics and statistics

Export your trade history for tax reporting or analysis.

***

## Best Practices

<AccordionGroup>
  <Accordion title="Take profits gradually">
    Consider closing part of a winning trade to lock in profits while letting
    the rest run. (When partial close is available)
  </Accordion>

  <Accordion title="Don't let winners become losers">
    If a trade is profitable, consider moving your stop-loss to break-even to
    protect against reversal.
  </Accordion>

  <Accordion title="Cut losses quickly">
    If a trade goes against you, don't average down with leverage. Accept the
    loss and preserve capital.
  </Accordion>

  <Accordion title="Review after closing">
    Analyze your closed trades to learn and improve. What worked? What didn't?
  </Accordion>
</AccordionGroup>

***

## Troubleshooting

<AccordionGroup>
  <Accordion title="Close transaction failing">
    * Ensure you have ETH for gas fees - Try increasing gas limit - Wait for
      network congestion to clear
  </Accordion>

  <Accordion title="P&L different than expected">
    * Check the exact entry and exit prices - Account for fees and interest -
      Oracle prices may differ slightly from exchange prices
  </Accordion>

  <Accordion title="Funds not appearing in balance">
    * Wait for transaction confirmation - Refresh the page - Check Trade History
      for settlement details
  </Accordion>
</AccordionGroup>

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Leverage Guide" icon="scale-balanced" href="/trading/leverage">
    Understand leverage and risk management.
  </Card>

  <Card title="Stop-Loss & Take-Profit" icon="bullseye" href="/trading/stop-loss-take-profit">
    Master automated exit orders.
  </Card>
</CardGroup>
