Based on the direction of your position — Long (Buy) or Short (Sell) — the formulas used to calculate the order cost of the Limit Order and Market Order will be different.

Order cost does not include funding fee. Funding fees will be calculated separately and deducted for traders based on current market conditions

FORMULA

Order Cost = Initial Margin + Fee to Open + Fee to Close

Initial Margin = (Order Price * Order Quantity) / Leverage

Fee to Open position = Order Price * Order Quantity * Taker Fee Rate

Fee to Close position = Order Quantity * Bankruptcy Price * Taker Fee Rate

Bankruptcy Price = [Order Price * (Leverage - 1)] / Leverage

Example

Trader A open a Long position of 1 BTC at VNDC 100,000,000 with 10x leverage.

The Order Cost is calculated as follows:

Initial Margin = (100000000 * 1) / 10 = 10,000,000 VNDC

Fee to Open position = 100000000 * 1 * 0.04% = 40,000 VNDC

Bankruptcy Price = [100000000 * (10 - 1)] / 10 = 90,000,000 VNDC

Fee to Close position = 1 * 90000000 * 0.04% = 36,000 VNDC

In the case, Order Cost = 10,000,000 + 40,000 + 36,000 = 10,076,000 VNDC

Order Quantity = (Order Cost * Leverage) / [Order Price * (0.0008 * Leverage + 0.9996)]

= (10076000 * 10) / [100000000 * (0.0008 * 10 + 0.9996) = 1 BTC.

### Short (Sell) Position

FORMULA

Order Cost = Initial Margin + Fee to Open + Fee to Close

Initial Margin = (Order Price * Order Quantity) / Leverage

Fee to Open position = Order Price * Order Quantity * Taker Fee Rate

Fee to Close position = Order Quantity * Bankruptcy Price * Taker Fee Rate

Bankruptcy Price = [Order Price * (Leverage + 1)] / Leverage

Example

Trader B open a Short position of 1 BTC at VNDC 100,000,000 with 10x leverage.

The Order Cost is calculated as follows:

Initial Margin = (100000000 * 1) / 10 = 10,000,000 VNDC

Fee to Open position = 100000000 * 1 * 0.04% = 40,000 VNDC

Bankruptcy Price = (100000000 * 11) / 10 = 110,000,000 VNDC

Fee to Close position = 1 * 110000000 * 0.04% = 44,000 VNDC

In the case, Order Cost = 10,000,000 + 40,000 + 44,000 = 10,084,000 VNDC

Order Quantity = (Order Cost * Leverage) / [Order Price * (0.0008 * Leverage + 1.0004)]

= (10084000 * 10) / [100000000 * (0.0008 * 10 + 1.0004)] = 1 BTC

### Note

• The Order Cost ( Initial Margin + Two-Way Taker Fee ) required has to be smaller than or equal to the available balance.

### Open Loss

When there is an unfavorable difference between the markup price and the position opening price, the trader will need to add an additional Open Loss to his position. Open Loss will be added to the margin of the position, short blocking the immediate liquidation caused by the price difference.

FORMULA Open Loss = Number of Contract * Absolut value {min[0, Direction of order * (Mark price - Entry price)]}

Direction of order: 1 for long order；-1 for short order