# Margin & Leverage

*Account value and withdrawable balance now include spot collateral.*

Pacifica supports cross margin and isolated margin. Margin mode is selected per trading pair. Cross margin is the default.

Margin mode cannot be changed for a symbol with an open position. Leverage can be increased on a symbol with an open position but cannot be decreased until the position is closed.

### Cross margin

Cross margin pools the account's USDC balance, unrealized PnL from cross perpetual positions, and LTV-adjusted spot collateral into a single equity figure that supports all cross positions.

```
account_value = usdc_balance + unrealized_pnl - pending_interest + spot_collateral_value
```

Unrealized PnL updates continuously. Isolated positions and their assigned margin are excluded. `pending_interest` is unsettled interest on any outstanding money-market borrow and is deducted from equity as soon as it accrues.

Spot holdings contribute to `account_value` according to per-asset LTV, a per-user collateral cap, and an optional hedging bonus. See [Spot Collateral](/docs/trading-on-pacifica/spot-collateral.md) for the full formula.

### Isolated margin

Isolated margin assigns a dedicated margin amount to each position. Isolated positions receive no collateral from spot holdings and are not affected by the unified margin model. Their liquidation is determined solely by the assigned isolated margin and the position's notional.

### Initial margin

Placing an order reserves initial margin based on entry price, position size, and selected leverage.

```
initial_margin = position_size * entry_price / leverage
```

### Unrealized PnL and withdrawable balance

Unrealized PnL can be withdrawn from an isolated position or a cross-margin account, subject to the 10% initial-margin floor. Open spot buy orders also deduct their locked USDC from withdrawable balance:

```
withdrawable_balance = usdc_balance + unrealized_pnl - pending_interest + spot_collateral_value
                     - max(initial_margin_required, 0.1 * total_position_value)
                     - spot_buy_order_locked_usdc
```


---

# 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://pacifica.gitbook.io/docs/trading-on-pacifica/margin-and-leverage.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.
