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

# Chainlink-compatible feeds

Most lending markets and vaults already read prices through Chainlink's `AggregatorV3Interface`. Delphi provides a feed contract with that interface for any token and window, so existing integrations can use a Delphi price without changing their code.

## Creating a feed

```solidity
function create(address token, uint32 window) external returns (address feed);
```

Call `create` on the feed factory with the token and the window in seconds. It deploys a feed for that pair if one does not exist and returns its address either way. Anyone can call it, and the address for a pair can be looked up afterwards with `feeds(token, window)`.

## What the feed returns

```solidity
function latestRoundData() external view returns (uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound);
function latestAnswer() external view returns (int256);
function decimals() external view returns (uint8);
function description() external view returns (string memory);
function version() external pure returns (uint256);
```

`answer` is the TWAP over the feed's window, the same value `consult` returns, and `decimals` is the quote asset's decimals, so an ETH-quoted feed answers in wei per token with eighteen decimals. `description` is the pair, for example `TSTTHREE / ETH TWAP`. The round fields are the block timestamp of the read, because the value is computed on demand rather than posted in rounds. `getRoundData` is not supported, since there is no round history to return.

`latestRoundData` reverts while the oracle is below the twelve-observation minimum. The feed also exposes `maturity()` and `observationCount()`, forwarded from the oracle, for integrations that want to check before reading.

## Differences from a posted feed

A Chainlink feed is updated by a network of nodes and can go stale if they stop posting. A Delphi feed has no updater: every read computes the average from the pool's own history at that moment, so it cannot be stale in that sense, and there is no heartbeat to monitor. The thing to monitor instead is the pool, which is why `maturity` and `depth` exist.


---

# 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.delphirhc.com/the-oracle/feeds.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.
