# Price

### Index Price

The **Index Price** represents the asset price as reported directly by the [Pyth oracle](https://pyth.network/) feed. You can retrieve it from the `price` field in the response of either the [Markets API](/developer-documentation/api/markets.md#retrieve-all-markets-info) or the [Individual Market API.](/developer-documentation/api/markets.md#retrieve-single-market-info)

**Example Response:**

```json
{
  "marketId": "100",
  "symbol": "ETH",
  "skew": "-816032563610058179",
  "price": 2751.21510528,
  "currentOI": "171613599036410749027",
  ...
}
```

### Market Price

The **Mark Price** is a dynamic price adjusted based on open interest skew. You can calculate it using the following formula:

```ts
const indexMultiplier = BigNumber(1e18)
  .plus(
    BigNumber(marketData.skew.toString())
      .dividedBy(marketData.skewScale as string)
      .multipliedBy(1e18)
  );

const markPrice = BigNumber(marketData.price)
  .multipliedBy(indexMultiplier.toString())
  .dividedBy(1e18)
  .toFixed(0);
```

Here, `marketData` is from the response from the [Markets API](/developer-documentation/api/markets.md#retrieve-all-markets-info) or the [Individual Market API](/developer-documentation/api/markets.md#retrieve-single-market-info).&#x20;

### Fill price

The **Fill Price** is the most accurate estimate of the execution price for a trade. It accounts for **slippage**, **skew**, and other adjustments, giving you a realistic expectation of what the trade will fill at for a given size.&#x20;

You can fetch this value using the [Post-Trade Details AP](/developer-documentation/api/orders.md#fetch-post-order-details)I:

```json
{
  "totalFees": "113173321557870967",
  "fillPrice": "2735468306793171306346",
  ...
}
```

> **Note:** When submitting a trade order, it’s recommended to pass a slightly more aggressive price than the one returned by the Post-Trade Details API. This is because the market can shift between the time you fetch the details and the moment the trade is executed. You can find an example implementation [here](https://github.com/Polynomial-Protocol/polynomial-starter-kit/blob/54aefb1375fdc37ac355d5c1c831de952473ad4c/lib/order.ts#L17).


---

# Agent Instructions: 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:

```
GET https://docs.polynomial.fi/developer-documentation/api/price.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
