# Use Oracle Feeds

Acala's [Open Oracle Gateway](https://wiki.acala.network/learn/acala-introduction#open-oracle-gateway) allows multiple oracles to be deployed on the Acala network, leveraging Acala's DeFi optimized oracle infrastructure, and serving any DApps on Acala, Polkadot, Kusama and beyond. The Open Oracle Gateway ensures Quality of Service, that is oracle transactions are classified as system transactions, and are guaranteed to be included in a block.

This pre-compiled contract make querying various price feeds for various assets available inside Acala EVM. Currently the `getPrice` method returns the aggregated price for a given asset. More price feed options are being made available.

Contract source code here: [evm-examples/oracle](https://github.com/AcalaNetwork/evm-examples/tree/master/oracle).

> ***NOTE:*** If you're running a local Acala node with EVM playground, you are like to have 0 prices for all of the tokens.

## Contract Address

Oracle contract address: `0x0000000000000000000000000000000000000801`

## Contract Methods

```javascript
// Get the price of the currency_id.
// Returns the (price, timestamp)
function getPrice(address token) public view returns (uint256, uint256);
```

## Try it on Playground

Navigate to the [EVM Playground](https://evm.acala.network/#/execute) - `Execute tab`.

Find the `Oracle Price Feed` contract and click the `Execute` Button.

![](https://801616779-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAz4EenwXLth_HO_hmJ%2F-MSZrOzj1qWb5dcLDZ_v%2F-MS_ASZBa1Eve121DEoY%2FScreen%20Shot%202021-02-03%20at%2012.55.05%20PM.png?alt=media\&token=4bd08b6a-0209-4226-b1de-7e43bc25805a)

In the `token: address` field, enter the ERC20 contract address (in the example DOT address as `0x0000000000000000000000000000000000000802`) for the token of interest. Feeds are available for DOT, RenBTC and XBTC.

Find all available token contract addresses [here](https://wiki.acala.network/build/development-guide/smart-contracts/advanced/use-native-tokens).

![](https://801616779-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAz4EenwXLth_HO_hmJ%2F-MSZrOzj1qWb5dcLDZ_v%2F-MS_AhT90-wYx6lU3ELu%2FScreen%20Shot%202021-02-03%20at%2012.27.16%20PM.png?alt=media\&token=053c2f3a-c8e7-4e2b-9007-2a90716e97e1)

Click on the `Call` Button, `Call results` should show the price and timestamp.

![](https://801616779-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MAz4EenwXLth_HO_hmJ%2F-MSZrOzj1qWb5dcLDZ_v%2F-MS_CSULQlX6vBePCt2x%2FScreen%20Shot%202021-02-03%20at%2012.27.29%20PM.png?alt=media\&token=01ab2ab5-8b71-45c4-80b6-4c7d38c7ea76)
