Margin is a good-faith deposit. It is the amount of collateral required to open a position for Leverage trading.

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

The leverage used is directly related to the initial margin used to maintain the position. The higher the leverage used, the lower the initial margin required.

Here comes the formula:

BTCUSDFP (Inverse Contract):

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 (Vanilla Contract):

To calculate the initial margin required for USDT Contracts, one needs to multiply the order value with the initial margin rate. The initial margin rate depends on the leverage used.

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

The margin used for a trade can be found on the "Open Positions" tab. Please be noted that the initial amount shown here includes the expected taker fee to close the position. 