> For the complete documentation index, see [llms.txt](https://docs.harmony.one/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.harmony.one/home/developers/tutorials/using-band-oracle.md).

# Using Band Oracle

The repo <https://github.com/harmony-one/band_oracle> contains examples on how to fetch price feeds using band oracle.

There are two scenarios:

* Fetching price feed in your javascript application code
* Fetching price feed in your smart contract

### Requesting data using BandChain.js library

<https://github.com/harmony-one/band_oracle/blob/main/main.js>

```
git clone https://github.com/harmony-one/band_oracle
cd band_oracle

yarn
node main.js
```

### Using BandChain data in EVM Smart Contract in Harmony

<https://github.com/harmony-one/band_oracle>

```
git clone https://github.com/harmony-one/band_oracle
cd band_oracle

yarn
export PRIVATE_KEY=place your private key here
yarn hardhat run ./scripts/deploy.js
```

Contract's been deployed and you can call `getPrice` or `getMultiPrices` to get actual prices. More details with code snippets are in <https://docs.harmony.one/home/developers/tools/oracle-band-protocol>

{% hint style="info" %}
Band’s StdReference contract for testnet **0xE740092E081CA7491A46C8Aa0175446e962e2A08**

Mainnet contract is coming soon...
{% endhint %}


---

# 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://docs.harmony.one/home/developers/tutorials/using-band-oracle.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.
