> For the complete documentation index, see [llms.txt](https://help.rails.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.rails.xyz/trading/price-feeds-and-sources.md).

# Price Feeds & Sources

The page covers each price on Rails, how it's defined, it's source and where it's used.

Rails uses a specific price for each calculation. The [Index Price](#index-price) anchors us to the wider market. The [Mark Price](#mark-price) estimates a fair contract value during trading. For options, the [Forward Price](#forward-price) reflects the futures curve at each expiry. At settlement, we use a defined index-price snapshot (i.e., the [Settlement Price](#settlement-price)) to calculate the final payoff.

## Index Price

Index Price generally refers to the composite [spot price](https://www.investopedia.com/terms/s/spotmarket.asp) of an asset, calculated by taking a weighted average or median of spot prices across several major exchanges. At Rails, we source index price data from multiple reputable APIs to ensure robustness, reduce the risk of price manipulation, and maintain availability.

To ensure reliability and availability, our system uses a multi-sourced cascading fallback approach anchored primarily by an FCA-regulated volume weighted index:

|                                                                     Primary Source                                                                    |
| :---------------------------------------------------------------------------------------------------------------------------------------------------: |
| [CoinDesk Aggregate Index API - CCIX](https://developers.coindesk.com/documentation/data-streamer/index_cc_v1_latest_tick_direct_trading_methodology) |

<table><thead><tr><th align="center" valign="middle">Backup Source 1</th><th align="center" valign="middle">Backup Source 2</th><th align="center">Backup Source 3</th></tr></thead><tbody><tr><td align="center" valign="middle"><a href="https://developers.coindesk.com/documentation/legacy-websockets/AggregateIndex">CoinDesk Aggregate Index API - CCCAGG</a><br><br>Used if the primary source becomes unavailable.</td><td align="center" valign="middle"><a href="https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/websocket/subscriptions">Hyperliquid Subscriptions API - Hyperliquid</a><br><br>Acts as a secondary fallback to maintain price availability.</td><td align="center"><a href="https://docs.kraken.com/api/docs/websocket-v2/ticker/">Kraken's Ticker (Level 1) API</a><br><br>Acts as the last fallback to maintain price availability.</td></tr></tbody></table>

{% hint style="info" %}
CoinDesk's [FCA-regulated, volume-weighted methodology](https://indices.coindesk.com/ccix#:~:text=Between%20both%20the%20most%20prominent%20reporting%20standards%2C,to%20provide%20a%20true%20market%20representative%20price.) actively filters liquidity anomalies and outlier manipulation, delivering the institutional-grade price integrity required for fair-value reporting and risk management.
{% endhint %}

## Forward Price

In derivatives, the Forward Price is the expected value of an underlying asset at a specific point in the future (i.e., the contracts expiry date). While the spot price tells you what an asset is worth now, the Forward Price accounts for market expectations, interest rates, cost of storage/carry, and yield over time. As a result, the forward price curve varies, depending on the time to maturity.

On Rails, forward prices are derived directly from real market expectations from [Deribit’s Get Book Summary by Currency Public API](https://docs.deribit.com/api-reference/market-data/public-get_book_summary_by_currency) endpoint. We use [Black-76](https://help.rails.xyz/trading/options/pricing-and-sensitivities-black-76-and-the-greeks.md) (A variant of Black-Scholes) to price our Options, which inputs the Forward Price directly into the call & put formulas rather than the Spot price, which adjusts for the expected price move along the curve over time.

## Mark Price

Mark Price is the estimated "fair value" of an open position, and calculated differently based on whether the product is a Perpetual or an Option:

<table><thead><tr><th valign="top">Perpetuals Mark Price</th><th valign="top">Options Mark Price</th></tr></thead><tbody><tr><td valign="top"><p><strong>Perpetuals Mark Price</strong> uses the median of three values:</p><ul><li>The adjusted index price</li><li>The Rails order-book median</li><li>The external index price</li></ul><p>The adjusted index is the index price plus a 150-second EMA of the gap between Rails' bid-ask midpoint and the index price. The Rails order-book median is the median of Rails' best bid, best ask, and last trade.</p></td><td valign="top"><p><strong>Options</strong> use the <a href="https://help.rails.xyz/trading/options/pricing-and-sensitivities-black-76-and-the-greeks.md">Black-76 model</a> with zero interest rates to calculate mark price.</p><p></p><p>Rails sources implied volatility from Deribit, then prices each option from the <a href="#forward-price">forward price</a> for it's expiry, and Rails enforces put-call parity and an intrinsic-value floor via the calculation.</p><p></p><p>Both products use an external index as an anchor. Options use an implied-volatility-based pricing model.</p></td></tr></tbody></table>

## Settlement Price

For derivative contracts that expire (like [Options](https://help.rails.xyz/trading/options.md)), the Settlement Price is the fixed reference value used at expiry to close out contracts, and calculate final cash payoffs between buyers and sellers. (Learn more at [Expiry & Settlement](https://help.rails.xyz/trading/options/expiry-and-settlement.md).)

The settlement Price on Rails is a single snapshot of the Index Price to calculate the payoff. At the moment settlement is executed, Rails takes the latest Index Price for the underlying asset from our primary source, [CoinDesk Aggregate Index (CCIX)](https://developers.coindesk.com/documentation/data-streamer/index_cc_v1_latest_tick_direct_trading_methodology). This single instantaneous value serves as the final price to calculate settlement payoffs across all open positions.

## Where are these prices used?

Perpetuals & Options on Rails use these price indices for different reasons:

<table><thead><tr><th width="154.0859375" valign="top">Price</th><th valign="top">Perpetuals</th><th valign="top">Options</th></tr></thead><tbody><tr><td valign="top">Index Price</td><td valign="top"><ul><li>Used for <a href="https://help.rails.xyz/trading/perpetuals/funding.md">Funding Rate Calculation</a>.</li><li>Used as the external anchor in <a href="#mark-price">Perpetuals Mark Price</a>.</li></ul></td><td valign="top"><ul><li>Used in short put/call margin calculations and as settlement reference.</li></ul></td></tr><tr><td valign="top">Forward Price</td><td valign="top"><ul><li>N/A - Not used in Perpetuals.</li></ul></td><td valign="top"><ul><li>A Black-76 input used for options pricing.</li></ul></td></tr><tr><td valign="top">Mark Price</td><td valign="top"><ul><li>Used for margin requirements, unrealized P&#x26;L, liquidation prices and triggers, TP/SL triggers, market order pricing, and limit price safety checks</li></ul></td><td valign="top"><ul><li>Used for Options Margin calculation and for Unrealized P&#x26;L.</li></ul></td></tr><tr><td valign="top">Settlement Price</td><td valign="top"><ul><li>N/A - Not used in Perpetuals.</li></ul></td><td valign="top"><ul><li>The underlying price at contract expiry.</li></ul></td></tr><tr><td valign="top">Formulas</td><td valign="top"><a data-mention href="https://help.rails.xyz/trading/perpetuals/perps-metrics-guide.md">Perps Metrics Guide</a></td><td valign="top"><a data-mention href="https://help.rails.xyz/trading/options/options-metrics-guide.md">Options Metrics Guide</a></td></tr></tbody></table>
