# How to Calculate Order Cost?

When you place a new order of BTCUSD contract, the estimated order cost will be displayed in real-time in the order zone.

The cost shown in the red box refers to the order cost.

What is Order Cost?

Order Cost is the total margin required to open a new position. It consists of the estimated initial margin and an estimated 2-way taker fees for opening and closing the position. Order cost is denominated in BTC terms for BTCUSD contract, and in USDT terms for BTCUSDT contract.

Does the order cost reserve taker fees regardless of the order type (limit or market order)?

Yes, order cost is reserved in a more conservative manner to assure the validity of the order. In another words, it assumes order opening and closing are both executed as taker trades. The actual transaction fee charged (or rebated) is determined by how the order is executed.

The 3 Factors of Order Cost

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

For example, Ann places a limit order at \$9,100 to buy 10,000 BTCUSD contracts, with a 5x leverage.

#### 1. Initial Margin

Initial margin is calculated by the order quantity and estimated execution price. For market orders, the estimated execution price is the best bid or ask price. For limit orders, the estimated entry price is usually the order price.

The market price is now around \$9,150. When Ann places a limit order to buy at \$9,100, the estimated execution price is \$9,100.

The initial margin is 0.21978 BTC, calculated as 10,000/9,100×(1/5). Please refer to “What is Initial Margin and Maintenance Margin” for more details.

#### 2. Taker Fee to Open

The taker fee to open is also calculated based on the estimated execution price and order quantity.

Taker fee to open is based on the estimated entry price. It is 0.00082 BTC, calculated as 10,000/9,100×0.075%.

#### 3. Taker Fee to Close

Taker fee to close is based on the estimated bankruptcy price of this order. Bankruptcy price is the price at which all the position margin is lost. Please refer to “What is Bankruptcy Price? (Inverse Contract)” for more details.

The bankruptcy price for this position is \$7,583.33 = 9,100×5 / (5+1)).

The estimated fee to close is 0.00098 BTC = 10,000 / 7,583.33 × 0.075%.

The total order cost will be 0.2215 BTC = 0.2197 + 0.00082 + 0.00098.

If Ann places a conditional order instead, order cost won’t be charged upon order placement. It will be charged when the conditional order is triggered instead. The order cost displayed when placing a conditional order is only for reference purpose.

Order Cost for Position Close

As market condition changes, Ann is concerned about BTC price. She therefore plans to reduce or close her long position.

• To reduce the position:  Ann shorts 5,000 BTCUSD contracts. The order cost is 0.
• To close the position: Ann shorts 10,000 BTCUSD contracts. The order cost is also 0.

Why is the order cost 0 for both cases?

When Ann holds a 10,000 BTCUSD long position, to short 5,000 or 10,000 contracts are effectively reducing or closing the long position. An order reducing an existing position releases position margin. And thus the order cost is 0 for such orders.

• To revert the position: The market price drops to \$9,070.5.Ann decides to turn her long position into short instead. She places a short order of 18,000 contracts. The order cost will be calculated based on the net 8,000 short position, instead of the total order amount.

Under hedged position mode (e.g. BTCUSDT contract trading), an “open order” requires order cost while a “close order” doesn’t.

How to check order cost?

You can find the order cost estimation on both order zone and the order confirmation window.