> For the complete documentation index, see [llms.txt](https://docs.rocksolid.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rocksolid.network/integration/price-data-feed.md).

# Price Data Feed

## tldr;

You can get the **rock.rETH:ETH** exchange rate here: <https://etherscan.io/address/0x716f0c5453099690b54e7b72d9491a72b8df445e#readContract#F1>

## Overview

The price of a vault share represents the value of the underlying asset the share is a claim on.&#x20;

### USD

For example if 1 **rock.rETH** share is worth 1.05 **rETH** and rETH/USD = $5,000 **USD**, then 1 rock.rETH = 1.05 x $5,000 = $5,250. Conversely that means 1 **rETH** = 0.95238 **rock.rETH** (1/1.05).

### ETH

Similarly for ETH, if 1 **rock.rETH** share is worth 1.05 rETH and 1 **rETH** = 1.1443 **ETH** then 1 rock.rETH = 1.05 x 1.1443 = 1.201515 ETH

## Integration

For integration with RockSolid vaults, there are a number of ways to source pricing, both on-chain and via API.

### On-chain

#### Rate Provider

The simplest way to calculate **rock.rETH** exchange rates is to use the Balancer rate provider deployed [here](https://etherscan.io/address/0x716f0c5453099690b54e7b72d9491a72b8df445e#readContract#F1). That returns the **rock.rETH:ETH** exchange rate in wei.  For example, at the time of writing it is 1161699563412314198 which when [converted](https://etherscan.io/unitconverter?wei=1161699563412314198) to ETH is 1.16. I.e. 1 rock.rETH = 1.16 ETH. For display, you would source ETH/USD from your preferred provider

#### ERC-4626 style calculation

To obtain the value 1 rock.rETH share in the underlying asset rETH purely from the smart contract, you can use standard ERC-4626 methods. You convert an amount of shares to assets and divide by the scale of the underlying. To obtain rock.rETH to rETH it would be:

* `convertToAssets(10 ** vault.decimals()) / 10 ** underlyingAsset.decimals()`&#x20;

For USD, simply multiple by the rETH/USD exchange rate

### API

We don't currently provide exchange rates via API. Please reach out at [product@rocksolid.network](mailto:undefined) if you need this. &#x20;


---

# 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.rocksolid.network/integration/price-data-feed.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.
