> ## Documentation Index
> Fetch the complete documentation index at: https://www.diadata.org/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Hydration

> dApps built on Hydration can leverage DIA oracles to access up-to-date asset price information.

## Oracle Details

### WBTC, DOT, USDT and USDC oracle

| Chain   | Address                                                                                                                               |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet | [0xdee629af973ebf5bf261ace12ffd1900ac715f5e](https://explorer.evm.hydration.cloud/address/0xdEe629af973ebF5bf261aCe12ffD1900ac715f5e) |
| Testnet | [0xc756bd338a97c1d2faab4f13b5444a08a1566917](https://explorer.evm.hydration.cloud/address/0xc756bd338a97c1d2faab4f13b5444a08a1566917) |

### tBTC, Aave, ETH, wstETH, sUSDs, & sUSDe oracle

| Chain   | Address                                                                                                                               |
| ------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| Mainnet | [0x48ae7803cd09c48434e3fc5629f15fb76f0b5ce5](https://explorer.evm.hydration.cloud/address/0x48Ae7803Cd09c48434E3FC5629F15fb76f0b5cE5) |
| Testnet | [0x5d8320f3ced9575d8e25b6f437e610fc6a03bf52](https://explorer.evm.hydration.cloud/address/0x5d8320f3ced9575d8e25b6f437e610fc6a03bf52) |

## Oracle Configuration

|                                       |                                                                                                                            |
| ------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Pricing Methodology**               | [VWAPIR](/docs/guides/methodologies/pricing-methodologies/vwapir-volume-weighted-average-price-with-interquartile-range-filter) |
| **Deviation (%) & Refresh Frequency** | 0.5% and 120 seconds                                                                                                       |
| **Heartbeat**                         | 24h                                                                                                                        |

## Available Asset Feeds

### Mainnet

| Asset Ticker | Adapter Address                                                                                                                       | Asset Markets                                                                                                  |
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| WBTC         | [0xeDD9A7C47A9F91a0F2db93978A88844167B4a04f](https://explorer.evm.hydration.cloud/address/0xeDD9A7C47A9F91a0F2db93978A88844167B4a04f) | [WBTC markets](https://www.diadata.org/app/price/asset/Ethereum/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/)   |
| DOT          | [0xFBCa0A6dC5B74C042DF23025D99ef0F1fcAC6702](https://explorer.evm.hydration.cloud/address/0xFBCa0A6dC5B74C042DF23025D99ef0F1fcAC6702) | [DOT markets](https://www.diadata.org/app/price/asset/Polkadot/0x0000000000000000000000000000000000000000/)    |
| USDT         | [0x8b0DDfB8F56690eAde9ECa23a7d90E153C268d5B](https://explorer.evm.hydration.cloud/address/0x8b0DDfB8F56690eAde9ECa23a7d90E153C268d5B) | [USDT markets](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/)   |
| USDC         | [0x17711BE5D63B2Fe8A2C379725DE720773158b954](https://explorer.evm.hydration.cloud/address/0x17711BE5D63B2Fe8A2C379725DE720773158b954) | [USDC markets](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/)   |
| tBTC         | [0xe5AcDfB0d5EC5cE34F7448B41ef4a97c4e83D9c1](https://explorer.evm.hydration.cloud/address/0xe5AcDfB0d5EC5cE34F7448B41ef4a97c4e83D9c1) | [tBTC markets](https://www.diadata.org/app/price/asset/Ethereum/0x18084fbA666a33d37592fA2633fD49a74DD93a88/)   |
| Aave         | [0x9E85d33FD87342762710FB4a1471df1Dc7bb5f8C](https://explorer.evm.hydration.cloud/address/0x9E85d33FD87342762710FB4a1471df1Dc7bb5f8C) | [Aave markets](https://www.diadata.org/app/price/asset/Ethereum/0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9/)   |
| ETH          | [0x1AF549Fe19A9B73D094173C41e18BF7F357F594b](https://explorer.evm.hydration.cloud/address/0x1AF549Fe19A9B73D094173C41e18BF7F357F594b) | [ETH markets](https://www.diadata.org/app/price/asset/Ethereum/0x0000000000000000000000000000000000000000/)    |
| wstETH       | [0x52bBB0BC38C42D60b24EBF0C617E8218D2aB6d36](https://explorer.evm.hydration.cloud/address/0x52bBB0BC38C42D60b24EBF0C617E8218D2aB6d36) | [wstETH markets](https://www.diadata.org/app/price/asset/Ethereum/0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0/) |
| sUSDs        | [0x4b32bfFC6aCD751446E79e8687ef3815fD7924FD](https://explorer.evm.hydration.cloud/address/0x4b32bfFC6aCD751446E79e8687ef3815fD7924FD) | [sUSDs markets](https://www.diadata.org/app/price/asset/Ethereum/0xa3931d71877C0E7a3148CB7Eb4463524FEc27fbD/)  |
| sUSDe        | [0x22CDEa305Cee63D082E79F8C5Db939EEcD0265D0](https://explorer.evm.hydration.cloud/address/0x22CDEa305Cee63D082E79F8C5Db939EEcD0265D0) | [sUSDe markets](https://www.diadata.org/app/price/asset/Ethereum/0x9D39A5DE30e57443BfF2A8307A4256c8797A3497/)  |

### Testnet

| Asset Ticker | Adapter Address                            | Asset Markets                                                                                                |
| ------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------ |
| WBTC         | 0xC9cCBe99bdD9538871f9756Ca5Ea64C2267cb0a7 | [WBTC markets](https://www.diadata.org/app/price/asset/Ethereum/0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599/) |
| DOT          | 0x422E745797EC0Ef399c17cE3E2348394F2944727 | [DOT markets](https://www.diadata.org/app/price/asset/Polkadot/0x0000000000000000000000000000000000000000/)  |
| USDT         | 0xb4aC9f0E6E207D5d81B756F8aF6efe3fe7B0E72c | [USDT markets](https://www.diadata.org/app/price/asset/Ethereum/0xdAC17F958D2ee523a2206206994597C13D831ec7/) |
| USDC         | 0xEE7aFb45c094DC9fA404D6A86A7d795d4aA33D28 | [USDC markets](https://www.diadata.org/app/price/asset/Ethereum/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/) |
| tBTC         | 0x9f7abE73e656DB45F56B1d3755940CB3fc82Fcaa | [tBTC markets](https://www.diadata.org/app/price/asset/Ethereum/0x18084fbA666a33d37592fA2633fD49a74DD93a88/) |
| Aave         | 0xC9E1415Eb64281aD449f50C454873d92F312d6fE | [Aave markets](https://www.diadata.org/app/price/asset/Ethereum/0x7Fc66500c84A76Ad7e9c93437bFc5Ac33E2DDaE9/) |

***

## How to Access Data

### getValue Method

To consume price data, you’ll need to invoke the `getValue` method on the oracle contract which you can access through the [DIA Oracle library](/docs/guides/how-to-guides/fetch-price-data/solidity#solidity-library) or the [interface](/docs/guides/how-to-guides/fetch-price-data/solidity#using-the-diaoraclev2-interface).

Below is an example of a contract consuming data from the oracle on Hydration testnet using the IDIAOracleV2 interface. If you pass `BTC/USD` as the key, it will return the most recent price of BTC in USD with 8 decimal places (e.g. 9601458065403 is \$96,014.58065403) along with the Unix timestamp of the last price update.

```js theme={"system"}
pragma solidity ^0.8.13;

interface IDIAOracleV2 {
    function getValue(string memory) external view returns (uint128, uint128);
}

contract DIAOracleV2Consumer{

    address immutable ORACLE = 0xc756bd338a97c1d2faab4f13b5444a08a1566917;

    function getPrice(string memory key)
    external
    view
    returns (
        uint128 latestPrice,
        uint128 timestampOflatestPrice
    ) {
        (latestPrice, timestampOflatestPrice) =
                 IDIAOracleV2(ORACLE).getValue(key);
    }
}
```

See the full example [here](/docs/guides/how-to-guides/fetch-price-data/solidity).

### Adapter Contracts

To consume price data from our oracle, you can use the adapter smart contract located at the [adapter address](/docs/guides/chain-specific-guide/hydration#asset-feeds) for each asset. This will allow you to access the same methods on the `AggregatorV3Interface` such as `getRoundData` & `latestRoundData`. You can learn more [here](/docs/guides/how-to-guides/migrate-to-dia).

This is a sample contract for consuming the `WBTC/USD` price feed on Hydration mainnet:

```solidity theme={"system"}
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface DiaAssetSpecificCallingConvention {
    function latestRoundData() external view returns (
        uint80 roundId,
        int256 answer,
        uint256 startedAt,
        uint256 updatedAt,
        uint80 answeredInRound
    );
}

contract DIAOracleSample {
    address wbtcAdapter = 0xeDD9A7C47A9F91a0F2db93978A88844167B4a04f;

    function getWBTCLatestPrice() external view returns (
        uint128 latestPrice,
        uint128 timestampOflatestPrice
    ) {
        // Call the Chainlink adapter's latestRoundData function
        (, int256 answer, , uint256 updatedAt, ) =
            DiaAssetSpecificCallingConvention(wbtcAdapter).latestRoundData();

        latestPrice = uint128(uint256(answer));
        timestampOflatestPrice = uint128(updatedAt);

        return (latestPrice, timestampOflatestPrice);
    }
}
```

***

## Request a Custom Oracle

DIA offers highly customizable oracles that are individually tailored to each dApp's needs. Each oracle can be customized in the following ways, including:

* Data Sources & Asset Feeds
* Pricing Methodologies
* Update Triggers (Frequency, Deviation, Heartbeat, ...etc)

Get a tailored oracle for your dApp, request one below:

<CardGroup>
  <Card title="Request Custom Oracle" href="/docs/guides/how-to-guides/request-a-custom-oracle" icon="angle-right" iconType="solid" horizontal />
</CardGroup>

## Support

For developer assistance, connect with the DIA team directly on [Discord](https://discord.gg/ZvGjVY5uvs) or [Telegram](https://t.me/diadata_org).
