Aster
  • OVERVIEW
    • What is Aster?
      • How to connect your wallet
      • Our smart contracts
  • PRODUCT
    • Product releases
    • AsterEX Pro
      • Pro fees
      • Order types
      • Margin
        • Calculating max transfers in Cross and Isolated margin
      • Mark price
      • Liquidations
      • Funding rate
      • Single asset mode & Multi-asset mode
      • ADL
      • Trailing Stop Order
      • Open Cost calculation
      • Referral program
      • API
        • How to create API
        • API document
      • Delisting of a perps contract
    • AsterEX Simple
      • Leverage
      • Price oracles
      • Fees & slippage
      • Degen Trading Mode
      • Dumb mode
      • Manage your positions
      • Order types
      • Interact with the contract directly
    • Aster Earn
      • Earn
        • Mint asBNB
        • Mint asCAKE
        • Mint asUSDF
        • Mint asBTC
        • Aster ALP
          • How to mint ALP?
          • How to burn ALP?
          • ALP Fees
      • Ecosystem
        • PancakeSwap
          • LP on PancakeSwap
        • Pendle
          • asUSDF on Pendle
          • asBNB on Pendle
          • USDF on Pendle
          • How to calculate Au points for LP and YT
        • Tranchess
        • Restaking
        • Yield Strategies
    • USDF Stablecoin
      • Situating USDF in the Stablecoin Landscape
      • How USDF Works
      • Maintaining the Peg
      • Fund Custody & Risk Management
      • FAQs
      • Tutorials
    • AsterLayer
    • Help
  • Stage 1: Spectra
    • Aster Spectra: Stage 1
    • Mint to Earn Au
    • Au Trader Boost
    • Trade like a Pro, Earn like a Pro
    • Treasure Boost Campaign
    • Referral Bonus & Team Boosts
  • Brand & Community
    • Aster Media Kit
    • Official links
  • About us
    • Audit Reports
    • Aster – Terms and Conditions
    • Aster – Privacy Notice
Powered by GitBook
On this page
  1. PRODUCT
  2. AsterEX Pro

Open Cost calculation

PreviousTrailing Stop OrderNextReferral program

Last updated 12 hours ago

Calculating the cost of opening a Limit Order:

1. Calculate the Initial Margin

Initial Margin

= Notional Value / Leverage Multiplier

=(102,990.0*1 BTC)/20x

=5,149.50

2. Calculate Open Loss

Open Loss = Number of Contracts × Absolute Value {min [0, Order Direction × (Mark Price — Order Price)]}

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

Open Loss of long order

= Number of Contract * Absolute Value {min[0, Direction of order * (Mark price — Order Price)]}

= 1 * Absolute Value {min[0, 1 * (102,988.4- 102,990.0)]}

= 1 * Absolute Value {min[0, (-1.6)]}

= 1 * 1.6

= 1.6

Open loss occurs when you place a long order.

Open Loss of Short Order

= Number of Contract * Absolute Value {min[0, Direction of order * (Mark Price — Order Price)]}

= 1 * Absolute Value {min[0, -1 * (102,988.4- 102,990.0)]}

= 1 * Absolute Value {min[0, 1.6]}

= 1 * 0

= 0

Open loss does not occur when you place a Short order.

3. Calculate the cost of Opening a Position

Since there is no Open Loss when you place a Short order, the cost of opening a Short order is equal to the Initial Margin.

Cost of opening a Long Order

= 5,149.50+ 1.6

=5,151.1

Cost of opening a Short Order

=5,149.50 + 0

= 5,149.50

Since an Open Loss occurs when you place a Long order, it costs more to place a Long order. In addition to the Initial Margin, you must also take into account the Open Loss.

Calculating the cost of opening a Market Order:

1. Calculate Estimated Entry Price

Long order estimated entry price = ask[0] * (1 + 0.05%); Short order estimated entry price = max(bid[0], mark price)

  • Estimated entry price of long order

=ask[0]*(1 + 0.05%)

=102,946.8*(1 + 0.05%)

= 102,998.27

*[0]:Level 1 price

  • Assuming price of short order

= max(bid[0], mark price)

= max (102,946.9, 102,941.0)

= 102,946.9

*[0]:Level 1 price

2. Calculate the Initial Margin

Initial Margin = Notional Value / Leverage Multiplier

  • Initial margin for long order

= Estimated entry price of long order * Number of Contracts / Leverage Multiplier

=102,998.27 * 1 /20

=5,149.9135

  • Initial margin for short order

= Estimated entry price of short order * Number of Contracts / Leverage Multiplier

=102,946.9 * 1/20

=5,147.345

3. Calculate the Open Loss

Open Loss = Number of Contract * Absolute Value {min[0, direction of order * (mark price — order price)]}

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

  • Open loss for long order

= Number of Contract * Absolute Value {min[0, direction of order * (mark price — order price)]}

= 1 * Absolute Value {min[0, 1 * (102,941.0–102,998.27)]}

= 1 * Absolute Value {min[0, -57.27]}

= 1 * 57.27

= 57.27

An Open Loss occurs when you place a Long order.

  • Open loss for short order

= Number of Contract * Absolute Value {min[0, direction of order * (mark price — order price)]}

= 1 * Absolute Value {min[0, -1 * (102,941.0–102,946.9)]}

= 1 * Absolute Value {min[0, 5.9]}

= 1 * 0

= 0

An Open Loss does not occur when you place a Short order.

4. Calculating the cost of Opening a Position

Since Open Loss occurs when you place a Long order, it costs more to place a Long order. In addition to the Initial Margin, you must also take into account the Open Loss.

  • Cost of opening a Long Order

=5,149.9135+57.27

=5,207.1835

  • Cost of opening a Short Order

=5,147.345+0

=5,147.345

Since there is no Open Loss when you place a short order, the cost of opening a Short order is equal to the to the Initial Margin. Initial Margin.