Coinlocally Docs
Perpetual Contracts
Perpetual Contracts
  • Introduction
  • Overview
    • Funding Rate
    • Mark Price
    • Index Price
    • Ladder Balancing Mechanism
    • Insurance Fund
    • Auto-Deleveraging (ADL)
  • USDT Margined Perpetual Contract
    • Introduction
    • Leverage and Position Limit
    • Ladder Maintenance Margin Rate
    • Margin and Profit/Loss Calculations
  • Coin Margined Perpetual Contracts
    • Currency Standard Perpetual Contract
    • Leverage and Position Limit
    • Ladder Maintenance Margin Rate
    • Margin and Profit/Loss Calculations
  • Functions
    • Perpetual Contract User Guide
    • One-way and Two-way Positions
    • Conditional Order
    • Take Profit, Stop Loss TP/SL
    • Take Profit Stop Loss Order
    • Contract Grid
    • Futures Copy
      • How to Carry Out a Transaction
      • Profit Sharing
      • How to Copy Trade
      • Futures Copy Trading Rules
Powered by GitBook
On this page
  • Definition
  • Data Sources & Weights
  • Index Price Calculation
  • Sampling Frequency
  • Index Exception Handling
  1. Overview

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_iPindex​=i=1∑n​wi​×Pi​

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)}wi​=0(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

δ=∣Pi−PmPm∣\delta = \left| \frac{P_i - P_m}{P_m} \right|δ=​Pm​Pi​−Pm​​​

If:

δ>3%\delta > 3\%δ>3%

Then:

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

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

PreviousMark PriceNextLadder Balancing Mechanism

Last updated 1 month ago