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.
What are QFEX Perpetual Futures?
A perpetual future is a derivative contract that allows you to speculate on the price of an underlying asset without ever having to physically own it. Unlike traditional futures contracts, perpetuals do not have an expiry date. You can hold a position for as long as you like, provided you maintain sufficient margin. Perps are the end state of leveraged finance. They are the most efficient and user-friendly way of trading all manner of asset classes. To ensure the price of the perpetual contract (Mark Price) stays close to the spot price of the underlying asset (Index Price), a mechanism called Funding is used. All QFEX Perpetual Futures are margined in USDC on Arbitrum. USDC is compliant with US Law and backed by US Treasuries.Index Price Sources
The Index Price is the reference spot price for the asset. We aggregate data from high-quality sources:- Equities: Real-time feeds from US stock exchanges.
- Indices: Derived from futures data.
- FX & Precious Metals: An aggregate of the most liquid ECNs.
Oracle Pricing
Our default pricing is: For non-equity indices: For equity indices: where is the corresponding change in the equity index future.Futures-Based Oracle Rolls
Some QFEX products derive oracle pricing from a dated futures contract and therefore roll from one contract month to the next on a published schedule to be found in reference data. ForCL-USD, COPPER-USD, and NATGAS-USD, the roll schedule is:
- On the 5th business day, the oracle remains 100% front-month.
- On the 6th business day, the oracle is 80% front-month and 20% next-month.
- On the 7th business day, the oracle is 60% front-month and 40% next-month.
- On the 8th business day, the oracle is 40% front-month and 60% next-month.
- On the 9th business day, the oracle is 20% front-month and 80% next-month.
- On the 10th business day, the oracle is 100% next-month and the roll is complete.
GET /settlement-calendar to resolve the active dated future for a supported QFEX symbol. The response returns:
future_symbol: the futures contract currently used by the oracle.active_until: the last timestamp at which that contract remains active for the QFEX symbol.expiration: the expiration timestamp of that dated future.
time is omitted, the endpoint returns the currently active contract. For live integrations, use the QFEX settlement calendar endpoint rather than hardcoding roll dates.
If the last known Index Price is stale (ie, the market is closed or otherwise down), we do the following:
1. Impact Notional Calculation
The system calculates the Volume-Weighted Average Price (VWAP) to fill a specific “Impact Notional” amount (defined below) from the top of the order book.- Impact Bid: The average price to sell the impact notional amount into the bids.
- Impact Ask: The average price to buy the impact notional amount from the asks.
2. Impact Price Deviation (IPD)
IPD measures the pressure on the price relative to the last traded price (or last calculated price). It is calculated as: Where:- is the latest Index price.
- Only “improving” deviations contribute to the IPD (i.e., if the Impact Bid is higher than current price, it pushes price up; if Impact Ask is lower, it pushes price down).
3. Price Update
The price is updated using an Exponential Moving Average (EMA) model to smooth out volatility while drifting towards the order book pressure. The formula used is: Where:- : New price.
- : Previous price.
- : Target price based on IPD, defined as .
- : Decay factor, defined as .
Time and Constants
- (Tau): Time constant, set to 8 hours (
28,800seconds). This controls the “inertia” of the price. - : Time elapsed since the last update.
- (Clamp Factor): Set to 0.1.
- : Clamped time delta, defined as . This prevents large jumps if updates are sparse.