> For the complete documentation index, see [llms.txt](https://exliquid.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://exliquid.gitbook.io/docs/trading/oracle-index-mark-price.md).

# Oracle, index price and mark price

Exliquid separates **reference pricing** from the last traded price so that market display, PnL and risk do not all depend on the same single number.

## Oracle price input

External market observations provide the reference data used by the network's price model.

For users and integrations, the important contract is that price inputs used for trading risk are validated and become part of the network's accepted market state before they influence margin or liquidation.

The internal collection, aggregation and submission topology is not part of the public integration contract.

## Index price

The **index price** represents the accepted external-market reference for a market.

It is used as an anchor for perpetual-market pricing and risk calculations.

## Mark price

The **mark price** is the risk-oriented price used for calculations such as:

* unrealized PnL;
* account or position equity;
* margin evaluation;
* liquidation eligibility.

The mark price is intentionally distinct from assuming that the most recent trade is always the correct risk reference. This reduces the effect of isolated or unusual trades on account risk.

## Last trade price

The **last trade price** is useful for market display and trade history, but clients should not substitute it for the mark price when calculating risk-sensitive values.

## Price protection

When reference-price data is unavailable, stale or otherwise outside the current market-safety rules, the market can restrict risk-increasing activity.

The exact protective behavior is versioned market behavior. Integrations should surface the market status returned by the API instead of guessing whether a market is safe to trade.

## API access

Use:

* `GET /api/v1/markets/{market}/prices` for current market price information;
* the `prices` WebSocket channel for low-latency updates;
* market and risk endpoints for the resulting account impact.

See [Funding and margin](/docs/trading/funding-and-margin.md) and [Liquidation and risk](/docs/trading/liquidation-and-risk.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://exliquid.gitbook.io/docs/trading/oracle-index-mark-price.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
