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

# Margin

Margin is the capital required to open and maintain a perpetual position.

## Position margin

```text theme={null}
Position Margin = Initial Position Margin + Manual Margin Adjustments
```

In isolated mode, margin can be added or removed as long as the remaining margin does not fall below the required initial margin.

## Initial margin

```text theme={null}
Initial Margin = Position Value / Leverage + Closing Fee
```

## Maintenance margin

```text theme={null}
Maintenance Margin = Position Value × Maintenance Margin Rate + Closing Fee
```

The maintenance margin rate depends on the position tier. Larger positions may use higher maintenance margin rates and lower maximum leverage.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.