# Margin Terms

1. Equity

(1) Isolated Margin Equity

Definition: The actual assets in your Isolated Margin Account. The equity of each position is calculated independently and does not affect each other.

Calculation: Equity = Transferred-in Amount - Transferred-out Amount + Realized PNL (Current Position) + Unrealized PNL (Current Position)

(2) Cross Margin Equity

Definition: The actual assets in your Cross Margin Account, which is the total equity of all positions.

Calculation: Equity = Transferred-in Amount - Transferred-out Amount + Realized PNL (All Positions) + Unrealized PNL (All Positions)

2. Available Margin

Definition: The remaining assets after deducting the frozen margin in your Futures Account, which can be used to open positions and add margin.

Calculation: Available Margin = Account Balance - Frozen Margin Account Balance = Transferred-in Amount - Transferred-out Amount + Realized PNL - (Margin Balance - Unrealized PNL)

3. Position Amount

Definition: The contract amount of the current position. The amount of the Long position is shown in green and the Short position is shown in red.

4. Average Entry Price

Definition: The average cost of opening a position, which can accurately display your actual opening cost. When adding positions in the current market, the position value will be recalculated based on the executed price.

Calculation: Avg. Open Price = Position Amount * Contract Value / Cumulative Open Value

Calculation: Avg. Entry Price = Position Amount * Contract Value / Cumulative Entry Value

5. Opening Value

Definition: Opening Value refers to the asset value after a position is opened.

Calculation: Open Value = Position Amount * Contract Value / Opening Price

6. Position Value

Definition: The current position value, estimated at the Mark Price.

Calculation:

Linear Contract Position Value = Position Amount * Mark Price

Inverse Contract Position Value = Position Amount * Contract Value / Mark Price

7. Position Margin

Definition: The margin used and locked for the position.

Calculation:

Position Margin = Initial Margin + Increased Margin - Decreased Margin + Unrealized PNL (Calculated at the Mark Price)

Under Isolated Margin mode, when the position margin is less than the maintenance margin, the position will be forcedly liquidated.

Under Cross Margin mode, when the position margin is less than the maintenance margin, the margin will be automatically allocated from the available balance to this position, and the position will be liquidated when the available balance is insufficient.

Notes:

(1) When increasing position, the position value will be increased by the corresponding amount.

(2) When decreasing position, the position value will be deducted by the decreasing ratio.

(3) When increasing leverage, the maintenance margin will remain the same since the initial margin is decreased.

(4) When decreasing leverage, the initial margin will be increased. If the initial margin < the position margin, the position margin remains the same; If the initial margin > the position margin, then a required amount will be transferred from the Available Margin to offset the differential. If the Available Margin > the required amount, the leverage is allowed to be adjusted.

8. Initial Margin

Definition: The margin required for opening positions.

Calculation:

Initial Margin = Opening Value * Initial Margin Rate

Initial Margin Rate = 1 / Leverage * 100%

9. Maintenance Margin

Definition: The minimum amount of margin required to keep your position open.

Calculation: Maintenance Margin = Avg. Entry * Position Amount * Maintenance Margin Rate

10. Frozen Margin

Definition: Frozen Margin refers to the frozen initial margin and trading fees when the current order cannot be executed immediately.

Calculation:

Linear Contract:

(Frozen) Opening Margin = Position Amount * Buying Limit Price * Initial Margin Rate

(Frozen) Trading Fees = Contract Amount * Buying Limit Price * Maker Rate

Inverse Contract:

(Frozen) Opening Margin = Contract Amount * Contract Value / Buying Limit Price * Initial Margin Rate

(Frozen) Trading Fees = Contract Amount * Contract Value / Buying Limit Price * Maker Rate

(2) Selling

Linear Contract

(Frozen) Opening Margin = Position Amount * Selling Limit Price * Initial Margin Rate

(Frozen) Trading Fees = Contract Amount * Selling Limit Price * Maker Rate

Inverse Contract

(Frozen) Open Selling Margin = Contract Amount * Contract Value / Selling Limit Price * Initial Margin Rate

(Frozen) Selling Trading Fees = Contract Amount * Contract Value / Selling Limit Price * Maker Rate

Notes:

(1) Frozen buying/selling limit price will be calculated at the lowest price in their own direction.

(2) Initial Margin Rate = 1 / Leverage * 100%

11. Profit & Loss Rate (PNL%)

Definition: The current PNL% of your open contracts, estimated at the Mark Price or the Latest Price.

Calculation: PNL% = Unrealized PNL / Initial Margin

12. Unrealized PNL

Definition: The current PNL of your open contracts, estimated at the Mark Price or the Latest Price.

Calculation:

(1) Linear Contract

(Long) Unrealized PNL = Position Amount * (Mark Price - Opening Price)

(Short) Unrealized PNL = Position Amount * (Opening Price - Mark Price)

(2) Inverse Contract

(Long) Unrealized PNL = Contract Amount * Contract Value * (1 / Avg. Opening Price  - 1 / Mark Price)

(Short) Unrealized PNL = Contract Amount * Contract Value * (1 / Mark Price - 1 / Avg. Opening Price)

13. Realized PNL

Definition: The realized PNL since opening the position, including the PNL at the time of settlement, paid trading fees and the funding fees.

Calculation:

(1) Linear Contract

(Long) Realized PNL = Position Amount * (Closing Price - Opening Price)

(Short) Realized PNL = Position Amount * (Opening Price - Closing Price)

(2) Inverse Contract

(Long) Realized PNL = Contract Amount * Contract Value * (1 / Avg. Opening Price - 1 / Closing Price)

(Short) Realized PNL = Contract Amount * Contract Value * (1 / Closing Price - 1 / Avg. Opening Price)

Note: The unit is BTC/ETH, and the Minimum Precision is 0.00000001 without rounding.

14. Bankruptcy Risk

Definition: Bankruptcy Risk is calculated based on the position margin and the maintenance margin for the current position. The larger the value, the higher the risk. When the risk reaches 70%, CoinEx will issue a liquidation alert; when reaching 100%, the liquidation process will be triggered.

Calculation:

Cross Margin: Bankruptcy Risk = Maintenance Margin / Position Margin * 100%

Isolated Margin: Bankruptcy Risk = Maintenance Margin / (Available Margin + Position Margin) * 100%