For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mark Price

The Mark Price is used to calculate unrealized PNL, margin requirements, liquidation triggers, and conditional order activations. It is designed to be resistant to price manipulation by incorporating multiple data sources.

Calculation

The Mark Price is updated approximately every 3 seconds, in sync with the oracle price feed. It is determined as the median of three price components:

  1. Price 1 = Oracle Price + 2.5-minute Moving Average of (Mid Price - Oracle Price)

  2. Price 2 = Mid(Ask1, Bid1, Last Price)

  3. Price 3 = Weighted median of perpetual contract mid-prices from five major exchanges (Binance, OKX, Bybit, Gate, MEXC) with weights 3:2:2:1:1

If only two of the three components are available, a fourth input is added: the 30-second moving average of Mid(Ask1, Bid1, Last Price).

Mark Price = Median(Price 1, Price 2, Price 3)

Where:

  • Oracle Price is the weighted-average spot price from external exchanges (see Oracle Price).

  • Mid Price = (Ask1 + Bid1) / 2 on AFX's own order book.

  • Last Price = Most recent trade price on AFX.

Why Mark Price Matters

The Mark Price is distinct from the Last Price. While the Last Price reflects the most recent trade, the Mark Price provides a more stable and manipulation-resistant reference. It is used for:

  • Calculating unrealized PNL and margin ratios.

  • Determining liquidation triggers.

  • Computing estimated liquidation prices shown in the UI.

  • Triggering conditional orders (when set to Mark Price trigger type).

During Listing

For newly listed contracts, during the initial risk-control period (first 15 minutes after trading begins), the Mark Price equals the Oracle Price. After this period, the Mark Price switches to the standard calculation described above.

Last updated