Skip to main content

Usage of DIA Oracles on Stacks

dApps building on Stacks can utilize DIA oracles to obtain up-to-date asset price information. These deployed oracles are suitable for use in production environments. They come with a list of supported assets and settings. However, if dApps require a custom oracle with a different set of assets and configurations, they should contact DIA on Telegram.

Oracle Details

Oracle Configuration

Asset Feeds

The Stacks oracle includes the following asset feeds:

How to Access Data

You can query for assets like "STX/USD" or "stSTX/USD" in the get-value() read function. It returns two values:
  1. The price of STX/USD with 8 decimals
  2. The timestamp of the last update (UTC timezone)
Below is the DIA oracle contract implementation in Clarity:
Learn more about DIA’s data sourcing and data computation architecture.

Support

For developer assistance, connect with the DIA team directly on Discord or Telegram. Developers seeking other specialized, production-grade oracle with tailored price feeds and configurations can initiate the request by contacting the DIA BD Team via Telegram.