Pyth Core upgrade July 31, 2026. Every Core user will need an API Key. Learn more →
Feed updates
Pyth.BN.XAG/USDTremovedPyth.BN.WTI/USDTremovedPyth.BN.USD/JPYremovedPyth.BN.TSLA/USDTremovedPyth.BN.SPCX/USDTremovedPyth.BN.NVDA/USDTremovedPyth.BN.MU/USDTremovedPyth.BN.MSTR/USDTremovedPyth.BN.MSFT/USDTremovedPyth.BN.XAU/USDTremovedPyth.BN.META/USDTremovedPyth.BN.INTC/USDTremovedPyth.BN.HOOD/USDTremovedPyth.BN.GOOGL/USDTremoved
View all
Developer Hub

Oracle Program

Discover how the Pyth oracle program aggregates publisher data

The oracle program is responsible for several tasks:

  1. Maintaining the set of price feeds.
  2. Storing the contributions of data providers to each price feed.
  3. Combining the individual data providers' prices into a single aggregate price and confidence interval.
  4. Performing any additional stateful computations on the resulting price series, such as computing moving averages.

The oracle solves these problems by maintaining a collection of SVM accounts to represent the set of price feeds. Each feed has two accounts: a product account to store metadata and a price account. The price account stores a list of authorized data providers for this specific price feed, and allocates storage space for each data provider's price. The oracle program exposes an instruction called upd_price that enables an authorized data provider to update the price account with their current estimate of the price and confidence interval. Additionally, the first time that upd_price is called in a slot, it will aggregate the individual data provider's prices into an aggregate price and confidence interval. Only the aggregate price and confidence are made available for use in downstream applications; the individual data providers prices are internal state of the oracle program. Finally, the oracle program computes an exponentially-weighted moving average of the oracle price.