> For the complete documentation index, see [llms.txt](https://naviprotocol.gitbook.io/navi-protocol-developer-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://naviprotocol.gitbook.io/navi-protocol-developer-docs/contract-configuration/get-pools-config-and-oracle-price-feeds.md).

# Get Pools Config and Oracle Price Feeds

NAVI offers essential data about specific lending and borrowing pools, as well as oracle price feeds, through its public **API** and **NAVI SDK**. This data includes key details like pool ID, reserve ID, borrow and supply balances, caps, interest rates, and **oracle prices**. It enables developers and users to understand the current state of a pool, its limitations, and potential opportunities for interaction, such as borrowing, supplying, and calculating rewards.

{% openapi src="/files/EcxiFD0a1WZ589Bbod8l" path="/api/navi/pools" method="get" %}
[a-1.json](https://2230654657-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWcKfs3vWiDuhitgCkBQQ%2Fuploads%2FFP0kGu5OvtHAfDb19kPZ%2Fa-1.json?alt=media\&token=40a11c9a-f6a1-4288-8874-d6c988aaa013)
{% endopenapi %}

### **Oracles in the NAVI Protocol**

In the NAVI protocol, each oracle is associated with a specific `poolId`, enabling developers to efficiently access and interact with oracle data. The oracle provides essential fields for accurate financial operations:

* **Decimal**: Defines the decimal precision of the pool's coin, ensuring calculations are accurate.
* **OracleID**: The unique identifier for the oracle, specifying its asset ID.
* **Value**: The current data point provided by the oracle, typically a numeric metric such as an asset price or exchange rate.
* **Price**: The market price retrieved from the oracle, ensuring real-time accuracy in financial computations.
* **Valid**: A boolean that indicates whether the oracle’s data is reliable and up-to-date. If `valid` is true, the data can be used safely for calculations. If false, the data may be outdated or unreliable.

To query an oracle, use the API to retrieve the oracle object linked to each pool and ensure you are accessing the correct data.

**Sample Data of Sui Price from API**:

{% code fullWidth="false" %}

```json
"oracle": {
    "decimal": 9,
    "value": "1830516540",
    "price": "1.83051654",
    "oracleId": 0,
    "valid": true
}
```

{% endcode %}

[**Sample Tx**](https://suivision.xyz/txblock/2jeVCjdfkUm4J6vMNVZtVne1o4NpdUFuJdvtuQyb8UgU?tab=Events) **and on-chain event of NAVI Orace Sui Price:**

{% code fullWidth="false" %}

```json
{
  "id": {
    "txDigest": "2jeVCjdfkUm4J6vMNVZtVne1o4NpdUFuJdvtuQyb8UgU",
    "eventSeq": "0"
  },
  "packageId": "0xca441b44943c16be0e6e23c5a955bb971537ea3289ae8016fbf33fffe1fd210f",
  "transactionModule": "oracle_pro",
  "sender": "0xa2fe7a0d7bd70fe76d32065ec7b3c604cd90016a560bf2f01b68f3b5bbd2d3aa",
  "type": "0xc2d49bf5e75d2258ee5563efa527feb6155de7ac6f6bf025a23ee88cd12d5a83::oracle::PriceUpdated",
  "parsedJson": {
    "id": 0,
    "last_price": "1831480060",
    "last_update_at": "1728614555256",
    "price": "1831268400",
    "price_oracle": "0x1568865ed9a0b5ec414220e8f79b3d04c77acc82358f6e5ae4635687392ffbef",
    "update_at": "1728614565290"
  },
  "bcs": "JjyLckUe7fhfVBPVwtNSNQKzVDkDMyjF92CYAsXDhUsTU28T1qeNR7r8GttQZ14V5yvEv4YQZW4XYRiMWLtt41NRhgxjCCvw5DwYEn3eFAaM3Bu4zYJBM24nFbCk2mXdnM2UkUNF3wEkUWZo4X23moGnzB"
}

```

{% endcode %}


---

# 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://naviprotocol.gitbook.io/navi-protocol-developer-docs/contract-configuration/get-pools-config-and-oracle-price-feeds.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.
