# How to Use Alcor Price Oracle

We've made it even easier for you to get started with the Alcor Price Oracle! You can find the full interface project at this **GitHub repository:** <https://github.com/alcorexchange/alcor-oracle-price>

Here's a step-by-step guide to help you effectively utilize the Alcor Price Oracle:

**Step 1**: Copy the hpp folder from our repository where we've provided a full interface for using the Alcor Price Oracle and paste it into your own project.&#x20;

**Step 2:** Access the Alcor Price Oracle within your cpp project by simply adding the following line of code:

| uint128\_t AlcorPriceOracle::getPriceTwapX64(poolId, twapInterval) |
| ------------------------------------------------------------------ |

Note: Most protocols use a 30-minute running TWAP, but it's essential to understand the trade-offs involved. Longer TWAPs are more tamper-resistant but may provide less accurate data during volatility. Shorter TWAPs offer more accurate data during volatility but may be less tamper-resistant. Consider your project needs and risks when selecting the TWAP length.&#x20;

**Step 3:** Modify and adapt it to work with your DApp's architecture and requirements.&#x20;

**Step 4:** Collaborate with the [**Community**](https://t.me/alcorexchange) We encourage you to join our community and engage with developers who are using the Alcor Price Oracle in their projects. Collaboration and knowledge-sharing are essential for building a stronger WAX Defi ecosystem.

By following these steps and using our provided interface, you can effortlessly integrate the Alcor Price Oracle into your project and leverage accurate and reliable asset prices on the WAX blockchain.

<br>


---

# 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://docs.alcor.exchange/alcor-swap/alcorswap-v2-price-oracles/how-to-use-alcor-price-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.
