> For the complete documentation index, see [llms.txt](https://docs-perp.trado.one/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs-perp.trado.one/perpetual/perp-info/margining.md).

# Margining

Trado supports users to manage positions using isolated margin mode. In isolated margin mode, the position margin is calculated as follows:&#x20;

Position Margin (Isolated Margin Mode) = Initial Margin + Adjusted Margin for the Position

<table><thead><tr><th width="209"></th><th></th></tr></thead><tbody><tr><td>Index</td><td>Explanation</td></tr><tr><td>Margin Rate</td><td>Margin Rate = (Initial Margin + Unrealized P/L within the position) / (Maintenance Margin Required + Closing Fees)</td></tr><tr><td>Maintenance margin</td><td>Maintenance margin refers to the amount of perpetual contract margin held in an account for a specific asset. There is typically a minimum requirement for maintenance margin, and falling below the minimum maintenance margin will trigger forced liquidation.</td></tr></tbody></table>

### Adjusting Margin

Users can choose to withdraw or deposit margin from a specific asset position, thereby altering the actual leverage of the position to balance position risk and achieve the desired level of risk.

\
When withdrawing margin, it is necessary to ensure that the remaining margin in the position is greater than the maintenance margin, and after withdrawing the margin, the actual leverage of the position is less than the maximum leverage for that asset.

\
When depositing margin, the amount deposited cannot exceed the balance in the trading wallet. Additionally, it must be ensured that after depositing, the actual leverage of the position is not less than 1.

\
**Example:**

1. User A opened a position of 100 USDX of ETH when ETH was at 2,500, using 10x leverage, meaning the initial margin was 10 U. When the market fluctuated and the ETH price dropped to 2,400, with an unrealized profit/loss of -4 USDT, the remaining margin is calculated as follows: 100/10 + 100 \* (2,400-2,500)/2,500 = 6 USDX

2. User A has 1,000 USDX in their trading wallet. They use 500 USDX as margin to open a 20x leveraged ETH perpetual short position. However, due to fluctuations in ETH price, User A's position is liquidated. In this case, due to using isolated margin model, User A only loses the 500 USDX used as margin for the ETH position. The additional 500 USDX in their trading wallet remains unaffected.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs-perp.trado.one/perpetual/perp-info/margining.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
