How to check your account margin ratio under the Multi-Assets Mode?
How to calculate margin ratio in the Multi-Assets Mode?
- 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)
Example
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 |
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 |
- 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 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%