Contracts margin is a good-faith deposit, or an amount of capital one needs to post or deposit to control a futures contract.

AAΧ deploys an isolated margin mode, the position margin required varies with the price movements.

Here comes the formula:

**BTCUSDFP:**

**1. Initial margin calculation for placing an order**

Initial Margin (Limit Order) = Number of contracts / Entry Price / Leverage

Initial Margin (Market Order) = Number of contracts / [(Bid + Ask) / 2] / Leverage

**2. Maintenance Margin** = Number of contracts / Entry price / Leverage

**3. Margin when adjusting leverage** = Value of position * (1 / Leverage + Commission fees) - min[0, Unrealized PnL]

**BTCUSDTFP and ETHUSDFP:**

**1. Initial margin calculation for placing an order**

Initial Margin (Limit order) = Number of contracts * Price * Multiplier / Leverage

Initial Margin (Market order) = Number of contracts * (Bid + Ask) / 2 * Multiplier / Leverage

**2. Maintenance Margin** = (Number of contracts/ Entry Price * Multiplier / Leverage) + Commission fees

**3. Margin when adjusting leverage** = Value of position * (1 / Leverage + Commission fees) - min [0, Unrealized profit and loss]

****Bid = The highest buying price on the order book**

****Ask = The lowest selling price on the order book**

**Example:**

**Margin in BTCUSDTFP: short 1 contract at a price of 9483.90 **

**1. Initial Margin (Limit Order)**

Commission = Order Value * fees rate

= 9.4839 * 0.0002

= 0.00189678

Initial Margin (Limit Order) = Number of contracts * Price * Multiplier / Leverage

= 1 * 9483.90 * 0.001 / 2

= 4.74195

**2. Maintenance Margin** =(Number of contracts / Entry Price * Multiplier / Leverage) + Commission fees

= (1 / 9533.60 * 0.001 / 2) + 0.00189678

= 0.001896832

3. **Margin when adjusting leverage** = Value of position * (1 / Leverage + Commission fees) - min [0, Unrealized profit and loss]

While we adjust the leverage to 5 at market price 9538.55, the margin will change as below:

= (9538.55 * 0.001) * (1 / 5 + 0.0002) - 0

= 1.90961771