Help Center
Futures
Perpetual Futures

Order Cost Calculation

4 minute 54 sec ago
130799 Read
42

What Is Order Cost?

Order cost refers to the total amount of funds required to place an order. Users can check the order cost at any time in the order placement or confirmation window. The order cost is affected by factors such as position value, leverage, and fees, including the initial margin required to open a position, entry fee, and exit fee.

Order Cost

Order cost, also known as order margin, can be viewed in the "Manual Trade" on the page.

Calculation Formula: Order Cost = Initial Margin + Entry Fee + Exit Fee

  • Initial Margin = (Position Value / Leverage) + Exit Fee
  • Entry Fee = Position Value × Taker Fee Rate Exit Fee for Long Positions
  • USDT-Margined Long Position Exit Fee = Position Value × Taker Fee Rate
  • BTC-Margined Long Position Exit Fee = Position Value × (1 + 1/Leverage) × Taker Fee Rate Exit Fee for Short Positions USDT-Margined Short Position Exit Fee = Position Value × (1 + 1/Leverage) × Taker Fee Rate BTC-Margined Short Position Exit Fee = Position Value × Taker Fee Rate Taker Fee Rate: For details, see [Fee Description]

Notes: When placing an order, the order cost required to open a position (initial margin + entry fee + exit fee) must be less than or equal to the available balance to successfully place the order.

Example: A user opens a short position of 1,000 contracts of BTC_USDT perpetual with 20x leverage at a price of 50,000 USDT.

  • Position Value = Position Size × Contract Multiplier × Price = 1,000 × 0.0001 × 50,000 = 5,000 USDT
  • Entry Fee = Position Value × Taker Fee Rate = 5,000 × 0.05% = 2.5 USDT
  • Exit Fee = Position Value × (1 + 1/Leverage) × Taker Fee Rate = 5,000 × (1 + 1/20) × 0.05% = 5,000 × 1.05 × 0.05% = 2.625 USDT
  • Order Cost = (Position Value / Leverage) + Exit Fee + Entry Fee = (5,000 / 20) + 2.625 + 2.5 = 250 + 2.625 + 2.5 = 255.125 USDT If the direction is changed to long, the position value and entry fee remain unchanged. Exit Fee = Entry Fee = 2.5 USDT
  • Order Cost = (Position Value / Leverage) + Exit Fee + Entry Fee = (5,000 / 20) + 2.5 + 2.5 = 250 + 2.5 + 2.5 = 255 USDT

Conversion Formula for USDT-Value Order Placement

When using USDT as the order value, the input is the order value. The system converts the input value into the maximum number of contracts available to place, so the actual order value may be slightly lower than the input value.

  • USDT-M Perpetual Contracts:
  • Long Position Conversion Contracts = Input USDT Amount / (1 + 0.00075 × 2) / (Price × Multiplier)
  • Short Position Conversion Contracts = Input USDT Amount / (1 + 0.00075 + 0.00075 × 2) / (max(Order Price, Best Ask Price) × Multiplier)
  • Coin-M Perpetual Contracts: Long Position Conversion Contracts = Input USDT Amount / (1 + 0.00075 + 0.00075 × 2) × Price
  • Short Position Conversion Contracts = Input USDT Amount / (1 + 0.00075 × 2) × max(Order Price, Best Bid Price)

Conversion Formula for USDT-Cost Order Placement

When using USDT as the order cost, the input is the margin cost. The system converts the input margin cost into the maximum number of contracts available to place, so the actual margin used may be slightly lower than the input cost.Long Position Conversion Contracts = floor(Cost / (0.0015 + 1/Leverage) / Multiplier / Order Price, 1)

  • Short Position Conversion Contracts = floor(Cost / (0.0015 + 1.00075/Leverage) / Multiplier / max(Order Price, Best Bid Price), 1)
  • Short Position Conversion Contracts = floor(Cost / (0.0015 + 1.00075/Leverage) / Multiplier / max(Order Price, Best Bid Price), 1)

FAQs

Why are the order costs of long and short positions different?

For the same number of contracts, the order costs for long and short positions will differ slightly. This is due to the different calculation formulas for the exit fee.

Note: The exit fee is only the margin reserved by the system to theoretically cover the worst-case scenario when closing a position. It is not the final exit fee you will pay at closing. If you close a position using take-profit or stop-loss, any remaining margin will be returned to your available balance.

Gate reserves the final interpretation right for this product.

Sign up now for your chance to win up to $10,000!
signup-tips