> For the complete documentation index, see [llms.txt](https://docs.re.al/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.re.al/services/oracles/redstone-on-re.al.md).

# Redstone on re.al

## Current Price Feeds

So far we have deployed the GOLD (XAU) and GBP price feeds on Unreal with Chainlink interface adapter.

{% tabs %}
{% tab title="re.al" %}

| Price Feed | Contract address                                                                                                                     |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| `GOLD`     | `coming soon...`                                                                                                                     |
| `GBP`      | [0x100c8e61aB3BeA812A42976199Fc3daFbcDD7272](https://explorer.re.al/address/0x100c8e61aB3BeA812A42976199Fc3daFbcDD7272?tab=contract) |

{% endtab %}

{% tab title="Unreal" %}

| Price Feed    | Contract address                                                                                                                 |
| ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `GOLD`        | [`0x1e527C813E4FB23e5708044AE11Bf05B6873c7ba`](https://unreal.blockscout.com/address/0x1e527C813E4FB23e5708044AE11Bf05B6873c7ba) |
| `GBP`         | [`0xAb0290C2a2be0D2e8b77e8A7A97a0808D31e650D`](https://unreal.blockscout.com/address/0xAb0290C2a2be0D2e8b77e8A7A97a0808D31e650D) |
| {% endtab %}  |                                                                                                                                  |
| {% endtabs %} |                                                                                                                                  |

## Code Snippets

### Querying Prices

```typescript
const getLatestSignedPrice = async () => {
  return await sdk.requestDataPackages({
    dataServiceId: "redstone-primary-prod",
    uniqueSignersCount: 3,
    dataFeeds: ["XAU"],
    urls: ["https://oracle-gateway-1.a.redstone.finance"],
  });
};

const dataPackagesResponse = await getLatestSignedPrice();

const { dataPackage } = dataPackagesResponse["XAU"]![0];

const parsedPrice = parsePrice(dataPackage.dataPoints[0].value);
```

### Updating Price

```typescript
const wrappedAdapter =
  WrapperBuilder.wrap(priceFeedAdapter).usingDataPackages(dataPackagesResponse);
const { dataPackage } = dataPackagesResponse["ETH"]![0];
await wrappedAdapter.updateDataFeedsValues(dataPackage.timestampMilliseconds);
```
