Informational Notes
This article currently does not support your language. Auto-translator is recommended for English.

How to Calculate Margin Ratio in the Multi-Assets Mode?

2022-07-06 07:02

How to check your account margin ratio under the Multi-Assets Mode?

If you select the [Multi-Assets Mode], you'll see a [Multi-Assets] tag on the Margin Ratio widget.

Since your margin balance is shared across multiple positions in the Multi-Assets Mode, please monitor your margin ratio closely. Once the margin ratio reaches 100%, all positions will be liquidated.

How to calculate margin ratio in the Multi-Assets Mode?

You can use the following equation to calculate your margin ratio in the Multi-Assets Mode:

Account Margin Ratio = Account Maintenance Margin / Account Equity

  • Account Maintenance Margin = Sum of Maintenance Margin of All Cross Positions (in USD)
  • Account Equity = Sum of Margin Balance of All Cross Positions (in USD)

Please note that the margin ratio is based on the prevailing market rate for USDTUSD and USDCUSD pairs.

Example

Suppose the asset pairs and their respective floating conversion rates are as follows:

Asset Pair

Asset Index

Index Bid Buffer

Index Ask Buffer

Bid Rate

Ask Rate

USDTUSD

0.99

0.01

0.005

0.9801

0.99495

USDCUSD

1

0

0

1

1

You want to trade two contracts, BTCUSDT perpetual and ETHUSDC with 100x and 50x leverage respectively. In this scenario, the Maintenance Margin Ratio will be 0.8% and 1% respectively. Depending on the margin mode you’re (Isolated or Cross), the account status and calculation changes of various parameters are as follows:

1. Initial state - No open positions

Symbol

BTCUSDT

ETHUSDC

Margin Asset

USDT

USDC

Asset Wallet Balance

200

220

Asset Equity

200

220

Maintenance Margin Ratio

0.008

0.01

Initial Margin Ratio

0.01 (100x)

0.02 (50x)

Unrealized PnL

0

0

Under the Single-Asset Mode:

USDT available for order = 200 USDC available for order = 220

Under the Multi-Assets Mode:

Account Equity = ∑min(assetEquity*bidRate, assetEquity*askRate) = 200 * 0.9801 + 220 * 1 = 416.02

As there are no open positions,

  • assetCrossInitialMargin = 0
  • uniAvailableForOrder = accountEquity-∑(assetCrossInitialMargin*askRate) = 416.02 - 0 = 416.02
  • USDT Available for Order = 416.02 / 0.99495 = 418.13
  • USDC Available for Order = 416.02 / 1 = 416.02
  • Account Maintenance Margin Ratio = 0
  • Margin Ratio = Account Maintenance Margin / Account Equity = 0

2. With open positions

Symbol

BTCUSDT

ETHUSDC

Margin Asset

USDT

USDC

Asset Wallet Balance

200

220

Asset Equity

200

220

Maintenance Margin Ratio

0.008

0.01

Initial Margin Ratio

0.01 (100x)

0.02 (50x)

Position Quantity

0.5

20

Entry Price

20,000 USDT

600 USDC

Mark Price

20,000 USDT

600 USDC

Unrealized PnL

0

0

Account Maintenance Margin = ∑assetMM*askRate = 0.5 * 20,000 * 0.008 * 0.99495 + 20 * 600 * 0.01 * 1 = 199.596

As there is no unrealized PnL,

  • Account Equity = accountWalletBalance = 416.02
  • uniAvailableForOrder = Account Equity - ∑(assetCrossInitialMargin * askRate) = 416.02 - (0.5 * 20,000 * 0.01 * 0.99495 + 20 * 600 * 0.02 * 1) = 76.525
  • USDT Available for Order = 76.525 / 0.99495 = 76.91
  • USDC Available for Order = 76.525 / 1 = 76.525
  • Margin Ratio = Account Maintenance Margin / Account Equity = 199.596 / 416.02 = 0.47977 = 47.98%

3. With open positions and unrealized PnL

Symbol

BTCUSDT

ETHUSDC

Margin Asset

USDT

USDC

Asset Wallet Balance

200

220

Asset Equity

200 - 500 = -300

220 + 400 = 620

Maintenance Margin Ratio

0.008

0.01

Initial Margin Ratio

0.01 (100x)

0.02 (50x)

Position Quantity

0.5

20

Entry Price

20,000 USDT

600 USDC

Mark Price

19,000 USDT

620 USDC

Unrealized PnL

0.5 * (19,000 - 20,000) = -500

20 * (620 - 600) = 400

  • Account Maintenance Margin = ∑assetMM*askRate = 0.5 * 19,000 * 0.008 * 0.99495 + 20 * 620 * 0.01 * 1 = 199.61
  • With unrealized PnL, Account Equity = ∑min(assetEquity*bidRate, assetEquity*askRate) = -300 * 0.99495 + 620 * 1 = 321.515
  • uniAvailableForOrder = Account Equity - ∑(assetCrossInitialMargin * askRate) = 321.515 - (0.5 * 19,000 * 0.01 * 0.99495 + 20 * 620 * 0.02 * 1) = -21
  • USDT Available for Order and USDC Available for Order are both 0
  • Margin Ratio = Account Maintenance Margin / Account Equity = 199.61 / 321.515 = 0.62084 = 62.08%