How to Calculate Margin Ratio in Multi-Assets Collateral Mode

I. Calculating Margin

【Potential Loss from Open Orders】

If a buy order is placed above the mark price, or a sell order below the mark price, the system considers this "potential order loss" when calculating both the initial margin ratio and the maintenance margin ratio.

Potential loss from an open USDT-M futures order = Number of contracts * Face value per contract * max (0, (Order price - Mark price) * Order direction)

Note: The order direction is +1 for long orders; -1 for short orders.

 

【Account Margin Equity】

Potential order loss refers to the potential loss from open orders.

Total loss of open orders = Σ Potential order loss per crypto * Last price

 

Unrealized PnL = Position direction * (Mark price - Average entry price) * Number of contracts * Face value per contract

Note: The position direction is +1 for long positions; -1 for short positions.

 

Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Note: Unrealized PnL is included in the margin asset. If positive, it's counted as a net asset of USDT; if negative, it's counted as a net liability of USDT.

 

Account margin equity = Margin asset - Total loss of open orders

 

【Account Initial Margin Ratio】

Account initial margin = Σ Initial margin across all assets (used in positions and open orders)

Initial margin in USDT = Initial margin in USDT-margined futures * USDT's index price

Account initial margin ratio = Account initial margin / Account margin equity

 

【Account Maintenance Margin Ratio】

Account maintenance margin = Σ Maintenance margin across all assets (used in open positions and orders)

Maintenance margin in USDT = Maintenance margin in USDT-margined futures * USDT's index price

Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

【Account Available Margin】

Account available margin (USD) = max (0, Account margin equity - Account initial margin)

 

II. Examples

Symbol (trading pair)

BTCUSDT

ETHUSDT

USDT

Wallet Balance

0.001

0.05

0

Equity

0.001

0.05

0

Last Price

85,200

1,600

1

Mark Price

85,202

1,602

1

Index Price

85,205

1,605

1

Collateral Rate

94%

94%

100%

Maintenance Margin Ratio

1.25%

2%

 

 

【Scenario 1】

Assume you have no open positions and no open orders in your account.

 

  • Account Margin Equity

Potential Loss for Open Orders: N/A (no open orders)

Unrealized PnL: N/A (no open positions)

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% = 155.5277

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 155.528 - 0 = 155.5277

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial Margin Ratio: N/A (no margin occupied)

 

  • Account Maintenance Margin Ratio

Maintenance Margin Ratio: N/A (no margin occupied)

 

  • Account Available Margin

Account available margin = max (0, 155.5277 - 0) = 155.5277

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

【Scenario 2】

Assume you currently have no open positions, but an open USDT-margined Futures long order of 0.001 BTC, placed at a price of 84,500 with 10x leverage.

 

  • Account Margin Equity

Potential loss from an open USDT-M futures order: 0

(= 1 * 0.001 * max (0, (84,500 - 85,202)) * 1 = 1 * 0.001 * max (0, -702) * 1 = 1 * 0.001 * 0 * 1)

Note: Potential loss from an open USDT-M futures order = Number of contracts * Face value per contract * max (0, (Order price - Mark price) * Order direction)

Total loss of open orders = 0 * 85,200 = 0

Note: Total loss of open orders = Σ Potential order loss per crypto * Last price

 

Unrealized PnL: N/A (no open positions)

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% = 155.5277

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 155.5277 - 0 = 155.5277

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial margin includes position margin and order margin. Since you have an open order but no positions, only the order margin needs to be calculated.

 

Initial margin = Order margin = (Order price * Number of contracts * Face value per contract) / Leverage = (84,500 * 0.001 * 1) / 10 = 8.45

Initial margin in USDT = 8.45 * 1 = 8.45

Note: Initial margin in USDT = Initial margin in USDT-margined futures * USDT's index price

 

Account initial margin ratio = 8.45 / 155.5277 = 5.433%

Note: Account initial margin ratio = Account initial margin / Account margin equity

 

  • Account Maintenance Margin Ratio

Since you have an open order but no positions, only the order's maintenance margin needs to be calculated.

Account maintenance margin = 1 * 0.001 * 84,500 * 1.25% = 1.05625

Note: Account maintenance margin = Number of contracts * Face value per contract * Order price / Tiered maintenance margin rate

Account maintenance margin ratio = 1.05625 / 155.5277 = 0.6791%

Note: Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

  • Account Available Margin

Account available margin = max (0, 155.5277 - 8.45) = 147.0777

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

【Scenario 3】

Assume you currently have no open positions, but an open USDT-margined Futures long order of 0.001 BTC, placed at a price of 85,203 with 10x leverage.

 

  • Account Margin Equity

Potential loss from an open USDT-M futures order: 0.001

(= 1 * 0.001 * max (0, (85,203 - 85,202)) * 1 = 1 * 0.001 * max (0,1) * 1 = 1 * 0.001 * 1 * 1)

Note: Potential loss from an open USDT-M futures order = Number of contracts * Face value per contract * max (0, (Order price - Mark price) * Order direction)

Total loss of open orders = 0.001 * 85,200 = 85.2

Note: Total loss of open orders = Σ Potential order loss per crypto * Last price

 

Unrealized PnL: N/A (no open positions)

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% = 155.5277

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 155.5277 - 85.2 = 70.3277

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial margin includes position margin and order margin. Since you have an open order but no positions, only the order margin needs to be calculated.

 

Initial margin = Order margin = (Order price * Number of contracts * Face value per contract) / Leverage = 85,203 * 0.001 * 1 / 10 = 8.5203

Initial margin in USDT = 8.5203 * 1 = 8.5203

Note: Initial margin in USDT = Initial margin in USDT-margined futures * USDT's index price

 

Account initial margin ratio = 8.5203 / 70.3277 = 12.115%

Note: Account initial margin ratio = Account initial margin / Account margin equity

 

  • Account Maintenance Margin Ratio

Since you have an open order but no positions, only the order's maintenance margin needs to be calculated.

Account maintenance margin = 1 * 0.001 * 85,203 * 1.25% = 1.0650375

Note: Account maintenance margin = Number of contracts * Face value per contract * Order price / Tiered maintenance margin rate

Account maintenance margin ratio = 1.0650375 / 155.5277 = 0.6848%

Note: Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

  • Account Available Margin

Account available margin = max (0, 70.3277 - 8.5203) = 61.8074

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

【Scenario 4】

Assume you have no open orders in your account, but have an open position as follows:

A long BTC position, with an average entry price of 84,000, a quantity of 0.001 BTC, and leverage of 10x.

 

  • Account Margin Equity

Potential Loss for Open Orders: N/A (no open orders)

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% = 155.5277

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 155.528 - 0 = 155.5277

Note: Account margin equity = Margin asset - Total loss of open orders

 

Unrealized PnL = 1 * (85202-84000) * 1 * 0.001 =1.202

Note: Unrealized PnL = Position direction * (Mark price - Average entry price) * Number of contracts * Face value per contract

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% + 1.202 * 1 * 100% =156.7297

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 156.7297 - 0 = 156.7297

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial margin includes position margin and order margin. Since you have a position but no orders, only the position margin needs to be calculated.

 

Initial margin = Position margin = Number of contracts * Face value per contract * Mark price / Leverage = 1 * 0.001 * 85,202 / 10 = 8.5202

Initial margin in USDT = 8.5202 * 1 = 8.5202

Note: Initial margin in USDT = Initial margin in USDT-margined futures * USDT's index price

 

Account initial margin ratio = 8.5202 / 156.7297 = 5.436%

Note: Account initial margin ratio = Account initial margin / Account margin equity

 

  • Account Maintenance Margin Ratio

Maintenance margin = 1 * 0.001 * 85,202 * 1.25% = 1.065

Note: Maintenance margin = Number of contracts * Face value per contract * Mark price / Maintenance margin ratio

Account maintenance margin ratio = 1.065 / 156.7297 = 0.6795%

Note: Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

  • Account Available Margin

Account available margin = max (0, 156.7297-8.5202) = 148.2095

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

【Scenario 5】

Assume you have a long BTC position, with an average entry price of 84,000, a quantity of 0.001 BTC, and leverage of 10x.

Meanwhile, you also have an open USDT-margined Futures long order of 0.001 BTC, placed at a price of 84,500 with 10x leverage.

 

  • Account Margin Equity

Potential loss from an open USDT-M futures order: 0

(= 1 * 0.001 * max (0, (84,500 - 85,202)) * 1 = 1 * 0.001 * max (0, -702) * 1 = 1 * 0.001 * 0 * 1)

Note: Potential loss from an open USDT-M futures order = Number of contracts * Face value per contract * max (0, (Order price - Mark price) * Order direction)

Total loss of open orders = 0 * 85,200 = 0

Note: Total loss of open orders = Σ Potential order loss per crypto * Last price

 

Unrealized PnL = 1 * (85202-84000) * 1 * 0.001 =1.202

Note: Unrealized PnL = Position direction * (Mark price - Average entry price) * Number of contracts * Face value per contract

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% + 1.202 * 1 * 100% =156.7297

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 156.7297 - 0 = 156.7297

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial margin includes position margin and order margin. Since you have a position and an order, both the position margin and order margin need to be calculated.

 

Account initial margin = (1 * 0.001 * 85,202 / 10) + (1 * 0.001 * 84,500 / 10) = 16.9702

Note: Account initial margin = Position margin + Order margin = (Number of contracts * Face value per contract * Mark price / Leverage) + (Number of contracts * Face value per contract * Order price / Leverage)

Account initial margin ratio = 16.9702 / 156.7297 = 10.828%

Note: Account initial margin ratio = Account initial margin / Account margin equity

 

  • Account Maintenance Margin Ratio

Since you have an open order and a position, both the order and position's maintenance margin needs to be calculated.

Account maintenance margin = 1 * 0.001 * 85,202 * 1.25% + 1 * 0.001 * 84,500 * 1.25% = 2.121275

Note: Account maintenance margin = Number of contracts * Face value per contract * Mark price / Tiered maintenance margin rate

Account maintenance margin ratio = 2.121275 / 156.7297 = 1.353%

Note: Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

  • Account Available Margin

Account available margin = max (0, 156.7297 - 16.9702) =139.7595

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

【Scenario 6】

Assume you have a long BTC position, with an average entry price of 84,000, a quantity of 0.001 BTC, and leverage of 10x.

Meanwhile, you also have an open USDT-margined Futures long order of 0.001 BTC, placed at a price of 85,203 with 10x leverage.

 

  • Account Margin Equity

Potential loss from an open USDT-M futures order: 0.001

(= 1 * 0.001 * max (0, (85,203 - 85,202)) * 1 = 1 * 0.001 * max (0,1) * 1 = 1 * 0.001 * 1 * 1)

Note: Potential loss from an open USDT-M futures order = Number of contracts * Face value per contract * max (0, (Order price - Mark price) * Order direction)

Total loss of open orders = 0.001 * 85,200 = 85.2

Note: Total loss of open orders = Σ Potential order loss per crypto * Last price

 

Unrealized PnL = 1 * (85202-84000) * 1 * 0.001 =1.202

Note: Unrealized PnL = Position direction * (Mark price - Average entry price) * Number of contracts * Face value per contract

 

Margin asset = 0.001 * 85,205 * 94% + 0.05 * 1,605 * 94% + 1.202 * 1 * 100% =156.7297

Note: Margin asset = Σ Collateral per crypto = Σ (Net asset of involved cryptos * Index price * Collateral rate + Net liability * Index price)

Account margin equity = 156.7297 - 85.2 = 71.5297

Note: Account margin equity = Margin asset - Total loss of open orders

 

  • Account Initial Margin Ratio

Initial margin includes position margin and order margin. Since you have a position and an order, both the position margin and order margin need to be calculated.

 

Account initial margin = (1 * 0.001 * 85,202 / 10) + (1 * 0.001 * 85,203 / 10) = 17.0405

Note: Account initial margin = Position margin + Order margin = (Number of contracts * Face value per contract * Mark price / Leverage) + (Number of contracts * Face value per contract * Order price / Leverage)

Account initial margin ratio = 17.0405 / 71.5297 = 23.82%

Note: Account initial margin ratio = Account initial margin / Account margin equity

 

  • Account Maintenance Margin Ratio

Since you have an open order and a position, both the order's and the position's maintenance margin need to be calculated.

Maintenance margin = 1 * 0.001 * 85,202 * 1.25% + 1 * 0.001 * 85,203 * 1.25% = 2.1300625

Note: Maintenance margin = Number of contracts * Face value per contract * Mark price / Tiered maintenance margin rate + Number of contracts * Face value per contract * Order price / Tiered maintenance margin rate

Account maintenance margin ratio = 2.1300625 / 156.7297 = 1.3591%

Note: Account maintenance margin ratio = Account maintenance margin / Account margin equity

 

  • Account Available Margin

Account available margin = max (0, 71.5297 - 17.0405) = 54.4892

Note: Account available margin = max (0, Account margin equity - Account initial margin)

 

 

Trading sobre la marcha con la aplicación HTX (iOS/Android)

¡Crea una cuenta en HTX para obtener recompensas especiales!

Refiere a tus amigos y ganarás hasta 1.500 USDT y el 30% de sus comisiones de trading.

Encuéntranos en

Twitter:

https://x.com/htx_global

https://x.com/HTXCommunity

Facebook: https://www.facebook.com/htxglobalofficial/

Instagram: https://www.instagram.com/htxglobalofficial/

Reddit: https://www.reddit.com/r/HuobiGlobal/

Medio: https://htxofficial.medium.com/

Telegram:

https://t.me/htxglobalofficial

https://t.me/HTXFutures_en

https://t.me/htxes_oficial

Discord:

https://discord.gg/htx-official

HTX se reserva el derecho, a su entera discreción, de modificar o cambiar o cancelar este anuncio en cualquier momento y por cualquier motivo sin previo aviso. Lo anterior es sólo para fines informativos y HTX no hace recomendaciones o garantías con respecto a cualquier activo digital, producto o promoción en HTX. Los precios de los activos digitales son altamente volátiles y el comercio de activos digitales implica un riesgo. Por favor, lea nuestro texto de Recordatorio de Riesgo aquí.