Skip to content

Margining

Cross and isolated margin, initial and maintenance requirements, the transfer margin rule, and liquidation thresholds.

Updated Nov 4, 2026Traders2 min read
On this page

Nexwest uses a margin system similar to major derivatives venues. The two core numbers are initial margin (what you need to open) and maintenance margin (what you need to stay open).

Margin modes

ModeCollateral sharedLiquidation scopeNotes
CrossAll cross positions in the accountEntire cross accountDefault; capital efficient
IsolatedOnly the position's marginThat positionAdd or remove margin
Strict isolatedOnly the position's marginThat positionMargin cannot be removed

Positions in different perp DEXs share margin only in unified account or portfolio margin mode. In standard mode, each DEX has its own cross pool. See accounts.

Initial margin

The margin required to open a position is:

code
initial_margin = position_notional / leverage
position_notional = size × mark_price

Leverage can be any integer from 1 to the market maximum. Opening a position checks the requirement; changing leverage afterward does not re-check it. You are responsible for monitoring the account.

Leverage is checked at entry only

Increasing leverage on an existing cross position does not free margin or move the liquidation price in the way many traders expect. Use the position preview and read liquidations before changing leverage.

Maintenance margin

Maintenance margin is half of the initial margin at maximum leverage:

code
maintenance_rate = 0.5 / max_leverage
maintenance_margin = position_notional × maintenance_rate

Examples:

Max leverageMaintenance rate
40x1.25%
20x2.50%
10x5.00%
5x10.00%
3x16.67%

A cross account is liquidated when account value falls below the sum of maintenance margin across positions. An isolated position is liquidated when its isolated equity falls below its maintenance margin.

Transfer margin rule

You can withdraw unrealized PnL or move margin out of a position only if the remaining margin satisfies both:

code
transfer_margin_required = max(initial_margin_required, 0.1 × total_position_notional)

The withdrawable field in clearinghouseState applies this rule. A withdrawal that would violate it is rejected before it reaches the chain.

Unrealized PnL

  • Cross: unrealized PnL is immediately available as initial margin for new positions.
  • Isolated: unrealized PnL is applied as additional margin to the open position; it cannot be spent elsewhere.

Example

A trader opens 1 BTC long at 100,000 USDC with 10x leverage and 10,000 USDC of collateral.

code
notional           = 100,000
initial margin     = 10,000
maintenance rate   = 5%
maintenance margin = 5,000

The position is liquidated when equity falls below 5,000, which corresponds to roughly a 5% adverse move before fees and funding.

Was this page helpful?