![](https://public.bnbstatic.com/image/cms/article/body/202210/d57bd1711facba5b9e07943eba5c206b.jpeg)
![mceclip1.png](https://public.bnbstatic.com/image/cms/article/body/202210/66f3aa317cf0e282d576d8472658fb96.png)
![](https://public.bnbstatic.com/image/cms/article/body/202210/6db95c7d81fbb3c33989adf56312c907.jpeg)
¿Cómo se puede calcular el margen máximo añadible/extraíble en los modos de margen cruzado y margen aislado?
Modo de margen cruzado
- crossWalletBalance - ∑Isolated Open Order Initial Margin - Cross Position Maintenance Margin
- crossWalletBalance + ∑Cross Unrealized PNL - ∑Cross Initial Margin - ∑Isolated Open Order Initial Margin
Modo de margen aislado
Contratos con margen de USDⓈ
Campo | Cálculo |
Cantidad máxima añadible al margen aislado | max (0, min(crossWalletBalance - ∑isolated open order initial margin - ∑crossPosition MM, Isolated Available for Order)) |
Cantidad máxima extraíble del margen aislado | max (0, min (isolatedWalletBalance - isolatedPosition MM, isolatedWalletBalance + size * (Mark Price - Entry Price) - Mark Price * abs(size) * IMR )) |
Contratos con margen de moneda
Campo | Cálculo |
Cantidad máxima añadible al margen aislado | max (0, min (crossWalletBalance - ∑Isolated Open Order Initial Margin - ∑crossPosition MM, Isolated Available for Order)) |
Cantidad máxima extraíble del margen aislado | max (0, min (isolatedWalletBalance - isolatedPosition MM, isolatedWalletBalance + size * contractSize * (1 / Entry Price - 1 / Mark Price) - abs(size) * contractSize * IMR / Mark Price)) |