# 强制平仓

强制平仓是合约交易中一个重要机制，旨在维持市场稳定并保护交易者免受重大损失。在SubstanceX中，有两种机制触发用户头寸的强制平仓：<br>

### 清算

当用户的净头寸价值低于最低维持保证金时，将会触发清算机制。

1. 净值 = 保证金 + 手续费后的收益。
2. 最低维持保证金 = 头寸数量 \* 标记价格 \* 维持保证金比率 + 预计平仓费用。
3. 多头：预估清算价 = (保证金 + 费用 - 开仓均价 \* 数量) / (数量 \* (维持保证金比率 + 预计平仓费比率 - 1))\
   空头：预估清算价 = (保证金 + 费用 + 开仓均价 \* 数量) / (数量 \* (维持保证金比率 + 预计平仓费比率 + 1))

* 通常情况下，各个币种的预估清算费率等于其开平仓手续费率
* 强制平仓将导致用户失去与该头寸相关的所有保证金。用户交易所钱包中的余额将不会受到影响。

\
**案例**

<table><thead><tr><th width="396">交易对</th><th align="right">BTC/USD</th></tr></thead><tbody><tr><td>多头/空头</td><td align="right">多头</td></tr><tr><td>保证金（$）</td><td align="right">10,000.00</td></tr><tr><td>开仓均价 （$）</td><td align="right">30,000.00</td></tr><tr><td>杠杆倍数</td><td align="right">30.00 x</td></tr><tr><td>数量</td><td align="right">10.00</td></tr><tr><td>当前价格（$）</td><td align="right">31,000.00、</td></tr><tr><td>费用（$）</td><td align="right">-200.00</td></tr><tr><td>维持保证金率</td><td align="right">0.5%</td></tr><tr><td>手续费率</td><td align="right">0.08%</td></tr><tr><td>预估清算价（$）</td><td align="right">29,165.95</td></tr></tbody></table>

### 最大盈利强平

当用户某个仓位的盈利达到保证金的一定倍数时，将会触发最大盈利强平，系统将会以市价对合约仓位进行平仓。​

1. 最大盈利 = 保证金 \* 最大盈利倍数​
2. 多头仓位：最大盈利价格 = 开仓价格 + 最大盈利 / 数量​
3. 空头仓位：最大盈利价格 = 开仓价格 - 最大盈利 / 数量​

&#x20;       •最大盈利并不代表实际收益。实际收益还需要扣除待收取费用。​

&#x20;       •不同交易对的最大盈利倍数可能不同。具体可参考 [永续合约规范](/zh/yong-xu-he-yue/yong-xu-he-yue-gui-fan.md).

**案例**

| 交易对       |    BTC/USD |
| --------- | ---------: |
| 保证金（$）    |  10,000.00 |
| 开仓均价（$）   |  30,000.00 |
| 杠杆倍数      |    30.00 x |
| 数量        |      10.00 |
| 最大盈利倍数    |         10 |
| 最大盈利（$）   | 100,000.00 |
| 最大盈利价格（$） |  40,000.00 |
| 平仓价格（$）   |  40,000.00 |
| 费用（$）     |    -100.00 |
| 收益（$）     |  99,900.00 |

<br>


---

# 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://docs.substancex.io/zh/yong-xu-he-yue/qiang-zhi-ping-cang.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.
