The opposite positions will be written-off when calculating the margin. Except the margin of users’ net positions, the written-off margin will be 0.5% value of write-off positions (size * contract size * direction price * 0.5%).
Write-off margin = (market buy price * write-off size * contract size + market sell price * write-off size * contract size) * 0.5% = (market buy price + market sell price) * write-off size * contract size * 0.5%
Net position margin =size of net position * contract size * market direction price * margin factor
Total margin = Write-off margin + Net position margin
If a user placed multiple positions on BTC/USDT market: Contract size = 1mBTC = 0.001BTC. Margin factor = 1% (when position size <= 3500)
Size | Open Price | Market direction price |
---|---|---|
-2 | 8300 | 7200 |
+2 | 6800 | 7230 |
-2 | 8500 | 7200 |
Size Write-off: 3 | ||
Net position : 1 | Direction price : 7200 |
Write-off margin = (30 * 0.001 * 7230+30 * 0.001 * 7200) * 0.5% = 2.165 USDT
Net position margin = size of net position * Contract size * market sell price * margin factor = 10 * 0.001 * 7200 * 1% = 0.72 USDT
If this user also placed an active order of buy size 10 at 7500, the margin of the order = Order Buy margin = price level * size * Contract size * Margin factor = 7500*10*0.001*1%=0.75 USDT
Total margin = Write-off margin + Net position margin + Order Buy margin = 1.0385 USDT