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

# Oracle deviation

## Oracle deviation

### Two prices for the same token

Every tracked stock token has:

* a **Chainlink oracle price** — authoritative, but frozen outside NASDAQ hours
* a **Uniswap pool price** — live 24/7, but only as good as the pool's liquidity

Otto reads both every \~5 minutes and publishes the difference:

```
dev_bps = (pool_px / chainlink_px − 1) × 10 000
```

```json
{
  "ticker": "NVDA",
  "pool": "0xb944cec30bd4175855215d767adc81f39e5f7e2b",
  "version": "v3",
  "quote": "USDG",
  "pool_px": 209.65,
  "chainlink_px": 209.68,
  "liquidity_usd": 46752.38,
  "dev_bps": -1.71
}
```

### Status thresholds

[`GET /v1/risk/oracle-deviation`](https://ottodata.gitbook.io/ottodata-docs/api-reference/pools-and-risk) attaches a status to each pool:

| Status    | Absolute deviation |
| --------- | ------------------ |
| `ok`      | < 100 bps          |
| `warning` | 100 – 500 bps      |
| `alert`   | > 500 bps          |

{% hint style="warning" %}
Always read `dev_bps` together with `liquidity_usd`. A 900 bps deviation in a $2k pool is noise — one small trade moves it. The same deviation in a deep pool is a real dislocation (or a genuinely stale oracle).
{% endhint %}

### When deviation is expected

* **Off-hours**: the oracle freezes, the pool keeps pricing news. Deviation here *is* the basis trade, seen from the DEX side.
* **Low liquidity**: thin pools drift on tiny volume.
* **Oracle pause**: if a token's `oracle_paused` flag is set (visible in the basis feed), the Chainlink leg is explicitly not updating.

Pool discovery covers Uniswap v3 `PoolCreated` and v2 `PairCreated` events since genesis, filtered to pools pairing a tracked stock token with a USD stablecoin.


---

# 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://ottodata.gitbook.io/ottodata-docs/concepts/oracle-deviation.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.
