# Price Oracle

{% tabs %}
{% tab title="Asset Prices" %}

1. Check the price from a Chainlink aggregator.
2. If the price is below or equal to zero, call dForce backup price oracle, which is currently maintained by the dForce team.
3. For prices Chainlink not provided, price is posted by service maintained by dForce team, currently, only DF.
4. In the future, dForce governance will manage the selection of price sources.
   {% endtab %}
   {% endtabs %}

{% tabs %}
{% tab title="Ethereum Mainnet" %}

| Asset                                                                | Address                                      |
| -------------------------------------------------------------------- | -------------------------------------------- |
| DF                                                                   | 0x1B7c5DA3D2DBc05B089053FA3318f26bdD8aB10A   |
| USDT                                                                 | 0x3E7d1eAB13ad0104d2750B8863b489D65364e32D   |
| USDC                                                                 | always equal to 1 dollar.                    |
| ETH                                                                  | 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419   |
| WBTC                                                                 | 0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c   |
| DAI                                                                  | 0xAed0c38402a5d19df6E4c03F4E2DceD6e29c1ee9   |
| GOLDx                                                                | 0x8C5022C57dE46252CE1a49644c5ADf5C866e3E8D\* |
| UNI                                                                  | 0x553303d460EE0afB37EdFf9bE42922D8FF63220e   |
| EUX                                                                  | 0xb49f677943BC038e9857d61E7d053CaA2C1734C1   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> TSLA | 0x1ceDaaB50936881B3e449e47e40A2cDAF5576A4a   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> AAPL | 0x139C8512Cde1778e9b9a8e721ce1aEbd4dD43587   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> AMZN | 0x8994115d287207144236c13Be5E2bDbf6357D9Fd   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> COIN | 0xb10a047f8db80d781D006F1401BEB7d70Eb4da1a   |
| {% endtab %}                                                         |                                              |

{% tab title="Binance Smart Chain Mainnet" %}

| Asset                                                                | Address                                      |
| -------------------------------------------------------------------- | -------------------------------------------- |
| DF                                                                   | 0x8fC12c875BE2f443F23fF8F0262E06F4696Aa5d1   |
| USDT                                                                 | 0xB97Ad0E74fa7d920791E90258A6E2085088b4320   |
| USDC                                                                 | always equal to 1 dollar.                    |
| BNB                                                                  | 0x0567F2323251f0Aab15c8dFb1967E4e8A7D42aeE   |
| BUSD                                                                 | 0xcBb98864Ef56E9042e7d2efef76141f15731B82f   |
| BTCB                                                                 | 0x264990fbd0A4796A3E3d8E37C4d5F87a3aCa5Ebf   |
| DAI                                                                  | 0x132d3C0B1D2cEa0BC552588063bdBb210FDeecfA   |
| ADA                                                                  | 0xa767f745331D267c7751297D982b050c93985627   |
| ATOM                                                                 | 0xb056B7C804297279A9a673289264c17E6Dc6055d   |
| FIL                                                                  | 0xE5dbFD9003bFf9dF5feB2f4F445Ca00fb121fb83   |
| ETH                                                                  | 0x9ef1B8c0E4F7dc8bF5719Ea496883DC6401d5b2e   |
| GOLDx                                                                | 0x7F8caD4690A38aC28BDA3D132eF83DB1C17557Df\* |
| UNI                                                                  | 0xb57f259E7C24e56a1dA00F66b55A5640d9f9E7e4   |
| EUX                                                                  | 0x0bf79F617988C472DcA68ff41eFe1338955b9A80   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> TSLA | 0xEEA2ae9c074E87596A85ABE698B2Afebc9B57893   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> AAPL | 0xb7Ed5bE7977d61E83534230f3256C021e0fae0B6   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> AMZN | 0x51d08ca89d3e8c12535BA8AEd33cDf2557ab5b2a   |
| <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> COIN | 0x2d1AB79D059e21aE519d88F978cAF39d74E31AEB   |
| {% endtab %}                                                         |                                              |
| {% endtabs %}                                                        |                                              |

`*GOLDx's price is calculated as the price of PAXG/30.1034768.`

{% hint style="info" %}
Prices for stocks <img src="/files/-Ma8GRlKaS18jpHACvy3" alt="" data-size="line"> are only considered valid during [market trading hours](https://www.nasdaq.com/stock-market-trading-hours-for-nasdaq) in Nasdaq. When asset price considered invalid during market close period, the protocol will disable operations (such as redeem collaterals, continue borrowing/minting, liquidateborrow, etc) until market opens again. For more comprehansive explanations, please refer to the [action rules in Stock Pool.](https://docs.dforce.network)
{% endhint %}

## Method

### getUnderlyingPrice()

Get the price of underlying token by iToken.

```
/**
     * @notice Get the underlying price of a iToken asset
     * @param _iToken The iToken to get the underlying price of
     * @return The underlying asset price mantissa (scaled by 1e18).
     *  Zero means the price is unavailable.
     */
    function getUnderlyingPrice(address _iToken)
        external
        view
        returns (uint256);
```

### getUnderlyingPriceAndStatus()

Get underlying price and status if the price is available (for example, stock's price is unavailable when market close, here is "[Nasdaq trading hours](https://www.nasdaq.com/stock-market-trading-hours-for-nasdaq)" for your reference).

```
/**
     * @notice Get the price and status of an underlying asset
     * @param _iToken The iToken to get the underlying price of
     * @return The underlying asset price mantissa (scaled by 1e18).
     * @return If the price is available, true is available, vice versa.
     */
    function getUnderlyingPriceAndStatus(address _iToken)
        external
        view
        returns (uint256, bool);
```


---

# Agent Instructions: 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:

```
GET https://developers.dforce.network/lend/lend-and-synth/oracle.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
