Index Price

Definition

The index price represents the fair market price of a trading pair. It is calculated using a weighted average of the latest transaction prices and bid/ask medians from multiple major exchanges.

This ensures the index accurately reflects the spot market value of the asset, minimizing manipulation and price spikes from any single exchange.

Data Sources & Weights

For USDT-margined contracts, the index price is derived from the following exchanges with equal weighting:

Contract
OKX Weight
Huobi Weight
Binance Weight

BTC/USDT

33.3%

33.3%

33.3%

ETH/USDT

33.3%

33.3%

33.3%

⚠️ The above weights and data sources may be adjusted dynamically according to market conditions, without prior notice.

Index Price Calculation

Let:

  • Pi​: Price from exchange i

  • wi​: Weight assigned to exchange i

Then, the Index Price Pindex is calculated as:

Pindex=i=1nwi×PiP_{\text{index}} = \sum_{i=1}^{n} w_i \times P_i

Where:

  • n: Number of exchanges (e.g., 3)

  • ∑wi = 1

Sampling Frequency

  • Price data from each exchange is fetched every 1 second via API.

  • Updates depend on the interval of index calculation.

Index Exception Handling

1. Removing Invalid Prices

If a price from an exchange:

  • Has not updated within 40,000 ms (40 seconds), and

  • Its previous value deviates significantly from the latest values

Then, the system treats this price as invalid:

wi=0(reset weight to 0 for that exchange)w_i = 0 \quad \text{(reset weight to 0 for that exchange)}

2. Abnormal Price Correction

If the price from any exchange deviates by more than ±3% from the median of all prices, it is considered abnormal.

Let:

  • Pm​: Median price of all sources

  • Pi: Price from a source exchange

δ=PiPmPm\delta = \left| \frac{P_i - P_m}{P_m} \right|

If:

δ>3%\delta > 3\%

Then:

Pi=Pm×(1±3%)P_i = P_m \times (1 \pm 3\%)

This applies to both BTC/USDT, ETH/USDT, or other contracts where the median deviation exceeds ±3%.

Last updated