Price Feed Exists
Determine if a price feed for the given price_identifier
exists.
Returns true
if there has been at least one on-chain update of this feed in the past.
Note that a false
answer may mean that the feed exists, but simply has never been updated on Aptos.
In this case, you can invoke update_price_feeds to pull an update on-chain.
Argument | Input | Description |
---|---|---|
price_identifier* hex | The ID of the price feed to check |
Examples
Example Code
use pyth::pyth;
use pyth::price_identifier;
pyth::price_feed_exists(price_identifier::from_byte_vec(x"<price_identifier>"));
Last updated on