- Mark price
The mark price is one of the reference prices for liquidation, and it is also used in all unrealized PnL calculations. Realized PnL is still calculated based on the actual market price.
The mark price formula for perpetual contracts is as follows:
Mark price = Median of (Price 1, Price 2, Last fill price)
Price 1 = Index price
Price 2 = Index price + 5-minute moving average
5-minute moving average = Moving average of [(Best bid + Best ask)/2 − Index price], calculated over a 5-minute period with data sampled every second.
Median: If Price 1 < Price 2 < Last fill price, Price 2 is the mark price.
Under extreme market conditions or in the event of price source deviations, the mark price may deviate from the spot price. In such cases, the mark price is set to Price 2 as a protective measure.
During system upgrades, maintenance, or trading suspensions, the mark price is calculated as follows:
The mark price formula remains unchanged, but the 5-minute moving average in Price 2 is set to 0 until normal operation resumes.
Compared to the perpetual contract price, which is more volatile in the short term, the mark price more accurately reflects the contract's fair value. The mark price is also used to prevent unnecessary liquidations and mitigate the risk of market manipulation.
- Index price
To enhance the stability of the index price and minimize deviations, AlphaX aggregates market data from multiple exchanges when calculating the underlying asset's latest index price. The reference markets include Binance, Gate.io, OKX, and MEXC, among others. AlphaX may update the composition of reference markets as needed.
The detailed rules are as follows:
If multiple listings of the same underlying asset exist on an exchange, only one is selected, with priority given to USDT-denominated assets. If no USDT-denominated asset is available, USD or other USD-pegged stablecoin (e.g., USDC) denominated assets will be selected.
All external exchanges are equally weighted in the price calculation.
The timestamp of execution data from external exchanges must be within an acceptable deviation from the current system time. If the deviation exceeds 5 seconds, that exchange will be excluded from the index calculation.
The mark price is updated in sync with each index price update.
If the fill price from an external exchange deviates by more than 3% from the median price across all exchanges within the same time period, that exchange will be excluded from index calculation.
Example:
Take BTC/USDT index price calculation as an example:
Let the BTC prices from Binance, OKX, Coinbase, Bitstamp, Bittrex, Gate, MEXC, Kraken, and Bybit be denoted as P1 to P9 respectively.
P1 to P9 are arranged in ascending order, the median is defined as the middle value. The median is named as Pmedian, define Pmedian as P5.
Calculate |Px / Pmedian - 1|. If greater than 3%, remove Px.
The remaining Px are assigned equal weights. For example, if P1 and P3 to P8 remain (7 values in total), each observation is assigned a weight of 1/7.
The index price PIndex = P1 * Weight + P3 * Weight + ... + P8 * Weight.
Thus, the index price for BTC/USDT is PIndex.
AlphaX reserves the right to modify, change, or cancel this announcement at any time at its sole discretion without prior notice.
- Notes
AlphaX supports the index price as a trigger condition for conditional orders such as take profit and stop loss orders.
However, no candlestick chart is currently available for the index price, so its historical price trend and trigger time cannot be viewed directly on the chart.
To clearly observe order trigger events on the candlestick chart, it is recommended to use "Last price" or “Mark price” as the trigger condition.