> For the complete documentation index, see [llms.txt](https://docs.surgecardano.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.surgecardano.com/core-concepts/how-prices-are-sourced.md).

# How prices are sourced

Every price in Surge comes from the DEX pools themselves, read directly from the Cardano blockchain by Surge's own price indexer. There is no third-party price API. A pool's price is simply its ADA reserve divided by its token reserve, updated every block.

### Live prices

* Surge's indexer follows the chain and records every pool's reserves each time they change. Those updates are pushed to Surge and on to your browser in real time, roughly once per block (about every 20 seconds).
* The price chart's **LIVE / STALE / RECONNECTING / OFFLINE** badge tells you whether this feed is flowing.
* Strategies react to these same ticks. A grid, for example, evaluates its rungs every time the reference pool's reserves change.

### Which pool is the price

A pair can have several pools on the same DEX (SundaeSwap allows anyone to create one). Surge uses the **deepest pool**, the one with the most ADA, for each DEX and pair. It ignores pools below the liquidity floor:

| Use                                     | Minimum ADA in the pool |
| --------------------------------------- | ----------------------- |
| Price feed, charts, portfolio valuation | 1,000 ADA               |
| Grid, Rule-based and Arbitrage trading  | 5,000 ADA               |

A token with no pool above the floor shows no price rather than a wrong one.

### Protection against bad ticks

Two filters run on every update:

* A tick whose price is more than **4×** away (up or down) from the pool's last accepted price is rejected as an outlier. If **three consecutive** ticks agree on the new level, Surge accepts the move as real. A single bad reading never moves your strategy.
* A pool whose ADA reserve drops below the floor is ignored until it recovers.

### Staleness

* For valuation (portfolio, token prices) a pool's price is considered stale after **24 hours** without a tick; Surge then reports "stale" instead of a number.
* Arbitrage refuses to compare two pools if either one has not ticked in the last **10 minutes**, and halts entirely if the whole feed has been silent for 90 seconds or has fallen 180 slots behind the chain. See [Sequential arbitrage](/strategies/sequential-arbitrage.md) and [Parallel arbitrage](/strategies/parallel-arbitrage.md).
* Under the same feed-liveness rule a rule-based plan pauses with "price feed stale" and a grid pauses with "pool shallow".

### New pools

The list of known pools is refreshed **once a day at midnight** (server time). A pool created during the day is not used until the next refresh, even if it becomes the deepest pool.

### Quotes and the mid price

The **mid price** (reserve ratio) is what charts and grid lines use. A **quote** for an actual trade size is different: it walks the pool's curve, so it includes price impact and the pool's liquidity-provider fee. The swap page and the rule-based engine always quote at size; the grid engine checks rungs against the mid price but sizes the order against the curve.

### Charts and indicators

The price chart offers candles at 1m, 5m, 15m, 30m, 1h, 4h, 12h and 1d intervals, built from the same pool history. Volume is derived from reserve changes that look like trades (both reserves move in opposite directions); liquidity deposits and withdrawals are excluded. RSI and SMA overlays are available on the chart; they are display-only and no strategy trades on them.

### Historical data and backtests

Arbitrage and DCA builders can backtest against the same pool history. History is available from 28 February 2026, and an arbitrage backtest window is capped at 90 days.


---

# 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://docs.surgecardano.com/core-concepts/how-prices-are-sourced.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.
