> For the complete documentation index, see [llms.txt](https://docs.exact.ly/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.exact.ly/guides/protocol/pricefeeddouble.md).

# PriceFeedDouble

Returns the price of an asset considering two different [Chainlink](https://docs.chain.link/docs/data-feeds/price-feeds/addresses/) price feeds.

Written as a generic implementation it can be used, for example, to retrieve the price of `WBTC`. Queries `BTC/ ETH` feed and multiplies it by the exchange rate between `WBTC / BTC` before returning the price that it’s then used by the [Auditor](/guides/protocol/auditor.md).

## Public State Variables

### baseUnit

```solidity
function baseUnit() external view returns (uint256)
```

The base units are used to normalize the answer when multiplied by the second price feed rate.

### decimals

```solidity
function decimals() external view returns (uint8)
```

Number of decimals that the answer of this price feed has.

### priceFeedOne

```solidity
function priceFeedOne() external view returns (contract IPriceFeed)
```

Main price feed where the price is fetched from.

### priceFeedTwo

```solidity
function priceFeedTwo() external view returns (contract IPriceFeed)
```

Second price feed where the asset's rate is fetched from.

## View Methods

### latestAnswer

```solidity
function latestAnswer() external view returns (int256)
```

Returns the price feed's latest value considering the other price feed's rate.


---

# 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.exact.ly/guides/protocol/pricefeeddouble.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.
