@@ -131,6 +131,10 @@ module pyth::pyth {
131
131
/// Update the cached price feeds with the data in the given VAAs.
132
132
/// The vaas argument is a vector of VAAs encoded as bytes.
133
133
///
134
+ /// The javascript https://github.com/pyth-network/pyth-js/tree/main/pyth-aptos-js package
135
+ /// should be used to fetch these VAAs from the Price Service. More information about this
136
+ /// process can be found at https://docs.pyth.network/consume-data.
137
+ ///
134
138
/// The given fee must contain a sufficient number of coins to pay the update fee.
135
139
/// The update fee amount can be queried by calling get_update_fee().
136
140
public fun update_price_feeds (vaas: vector <vector <u8 >>, fee: Coin <AptosCoin >) {
@@ -264,9 +268,16 @@ module pyth::pyth {
264
268
/// Get the latest available price cached for the given price identifier, if that price is
265
269
/// no older than the stale price threshold.
266
270
///
271
+ /// Please refer to the documentation at https://docs.pyth.network/consumers/best-practices for
272
+ /// how to how this price safely.
273
+ ///
267
274
/// Important: it is recommended to call update_price_feeds() to update the cached price
268
275
/// before calling this function, as get_price() will abort if the cached price is older
269
276
/// than the stale price threshold.
277
+ ///
278
+ /// Note that the price_identifier does not correspond to a seperate Aptos account:
279
+ /// all price feeds are stored in the single pyth account. The price identifier is an
280
+ /// opaque identifier for a price feed.
270
281
public fun get_price (price_identifier: PriceIdentifier ): Price {
271
282
get_price_no_older_than (price_identifier, state::get_stale_price_threshold_secs ())
272
283
}
0 commit comments