Skip to content

Commit 976d7fc

Browse files
committed
explain no older than
1 parent a8b8e23 commit 976d7fc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pyth-sdk-solana/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ println!("price: ({} +- {}) x 10^{}", current_price.price, current_price.conf, c
4848
The `PriceFeed` object returned by `load_price_feed_from_account_info` contains all currently-available pricing information about the product.
4949
This struct also has some useful functions for manipulating and combining prices; see the [common SDK documentation](../pyth-sdk) for more details.
5050

51+
`get_price_no_older_than` takes in an `age` in seconds. If the current aggregate is older than `current_timestamp - age`, `get_price_no_older_than` will return `None`.
52+
5153
Note that your application should also validate the address of the passed-in price account before using it.
5254
Otherwise, an attacker could pass in a different account and set the price to an arbitrary value.
5355

0 commit comments

Comments
 (0)