Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.qfex.com/llms.txt

Use this file to discover all available pages before exploring further.

Market Data Price

The price of the underlying asset, derived from the relevant external oracle source.
Denoted as PtmarketP_t^{\text{market}}.

Index Price

When the current market price stays within the allowed band, the index price is: Ptindex=PtmarketP_t^{\text{index}} = P_t^{\text{market}} when Ptmarket[0.5Pt1market,  1.5Pt1market]P_t^{\text{market}} \in [0.5 P_{t-1}^{\text{market}},\; 1.5 P_{t-1}^{\text{market}}] Otherwise, the index price is held at the prior market price: Ptindex=Pt1marketP_t^{\text{index}} = P_{t-1}^{\text{market}} That is, the Index Price equals the current Market Data Price if it lies within ±50% of the previous value, otherwise the prior price is used.

Oracle Price

Defined in Contract Specifications:

Mark Price

The Mark Price PtmarkP_t^{\text{mark}} is computed as: Ptmark=Median(Ptoracle,  Ptoracle+EMA150s(MtPtoracle),  Median(Bt,  At,  Tt))P_t^{\text{mark}} = \text{Median} \Big( P_t^{\text{oracle}},\; P_t^{\text{oracle}} + \text{EMA}_{150s}(M_t - P_t^{\text{oracle}}),\; \text{Median}(B_t,\; A_t,\; T_t) \Big) where MtM_t is the mid price, BtB_t the best bid, AtA_t the best ask, and TtT_t the last traded price.

Unrealized PnL

PnLunrealized=iqi(PtmarkPi,entry)PnL_{\text{unrealized}} = \sum_i q_i \cdot (P_t^{\text{mark}} - P_{i,\text{entry}}) for all open positions ii with quantity qiq_i.

Realized PnL

PnLrealized=j(Pj,exitPj,entry)qjPnL_{\text{realized}}= \sum_j (P_{j,\text{exit}} - P_{j,\text{entry}}) \cdot q_j for all closed positions jj.

Cash

Cash=DW+Fnet+RRFees\text{Cash} = D - W + F_{\text{net}} + RR - \text{Fees} where DD = deposits, WW = withdrawals, FnetF_{\text{net}} = net funding, RRRR = referral rewards.

Margin

Margin=Position Margin+Order Margin\text{Margin} = \text{Position Margin} + \text{Order Margin}

Account Equity

Equity=Cash+PnLrealized+PnLunrealized\text{Equity} = \text{Cash} + PnL_{\text{realized}} + PnL_{\text{unrealized}}

Available Balance

Available Balance=Account EquityMargin\text{Available Balance} = \text{Account Equity} - \text{Margin}

Withdrawable Balance

Withdrawable Balance=Cash+PnLrealized+min(PnLunrealized,0)1.05×Margin\text{Withdrawable Balance} = \text{Cash} + PnL_{\text{realized}} + \min(PnL_{\text{unrealized}}, 0) - 1.05 \times \text{Margin}

Position Value

V=Ptmark×QV = P_t^{\text{mark}} \times Q where QQ is the position quantity in the symbol.

Funding Rate

The rate rtfundingr_t^{\text{funding}} paid between long and short positions when the futures price deviates from the underlying index.

Funding Fee

Funding Fee=Ptmark×Q×rtfunding\text{Funding Fee} = P_t^{\text{mark}} \times Q \times r_t^{\text{funding}}

Liquidation Spread

The maximum spread Δliq\Delta_{\text{liq}} from PtmarkP_t^{\text{mark}} at which an orderly Immediate-or-Cancel (IOC) liquidation order is executed.

DLP Fee

A fee fDLPf_{\text{DLP}} paid to Designated Liquidity Providers (DLPs) who absorb liquidated positions.

Mark-to-Market (MTM)

All portfolios are re-evaluated every 200 ms using the Mark Price PtmarkP_t^{\text{mark}} to:
  • Recalculate Unrealized PnL,
  • Detect margin requirement breaches,
  • Trigger liquidation procedures.