Oracle Interface
Build a mainnet oracle v5 update with the Pyth Pro price object and the selected NAVI feed.
Oracle integration guide for developers
Use oracle_pro::update_single_price_v3 to write one asset price. On November 24, 2026 the deployed oracle v5 package used the following signature. Resolve the current package before building a transaction.
public fun update_single_price_v3(
clock: &Clock,
oracle_config: &mut OracleConfig,
price_oracle: &mut PriceOracle,
supra_oracle_holder: &OracleHolder,
pyth_price_info: &ProPriceInfoObject,
switchboard_aggregator: &Aggregator,
feed_address: address,
)ProPriceInfoObject is the oracle's alias for pyth_pro_compatible::price_info::PriceInfoObject. The legacy Pyth object has a different Move type. The old update_single_price, update_single_price_v2, get_price_from_adaptor and get_price_from_adaptor_v2 functions abort in v5.
Oracle configuration
Read the selected market's feed at transaction-building time. This example appends the NAVI update for SUI to a programmable transaction after the upstream prices are fresh.
import { Transaction } from '@mysten/sui/transactions';
import { getConfig } from '@naviprotocol/lending';
export async function appendSuiPriceUpdate(tx: Transaction) {
const { oracle } = await getConfig({ market: 'main' });
const feed = oracle.feeds.find((candidate) => candidate.oracleId === 0);
if (!feed) throw new Error('SUI feed missing from the main market');
tx.moveCall({
target: `${oracle.packageId}::oracle_pro::update_single_price_v3`,
arguments: [
tx.object('0x6'),
tx.object(oracle.oracleConfig),
tx.object(oracle.priceOracle),
tx.object(oracle.supraOracleHolder),
tx.object(feed.pythPriceInfoObject),
tx.object(oracle.switchboardAggregator),
tx.pure.address(feed.feedId),
],
});
}Data sources
| Configuration field | How to use it |
|---|---|
feed.pythPriceInfoObject | Pass the Pyth Pro object as the fifth argument. For SUI it was 0x89b2…87f0 on November 24, 2026. |
feed.pythPriceFeedId | Identifies the upstream Pyth feed when refreshing provider data. |
feed.feedId | Pass the NAVI feed address as the final pure argument. |
oracle.supraOracleHolder and oracle.switchboardAggregator | Supply both shared objects in their declared positions. The feed configuration determines which providers are consulted. |
To have the SDK append provider and NAVI updates together, use updateOraclePricesPTB(tx, [feed], { market: 'main', updatePythPriceFeeds: true }) and await the result. See Oracle prices for the market's feed settings.