Crate pyth_client
source · [−]Expand description
A Rust library for consuming price feeds from the pyth.network oracle on the Solana network.
Please see the crates.io page for documentation and example usage.
Modules
Program instructions for end-to-end testing and instruction counts
Program instruction processor for end-to-end testing and instruction counts
Structs
Public key of a Solana account
An exponentially-weighted moving average.
Mapping accounts form a linked-list containing the listing of all products on Pyth.
Price accounts represent a continuously-updating price feed for a product.
The price and confidence contributed by a specific publisher.
A price with a degree of uncertainty, represented as a price +- a confidence interval.
The confidence interval roughly corresponds to the standard error of a normal distribution.
Both the price and confidence are stored in a fixed-point numeric representation, x * 10^expo
,
where expo
is the exponent. For example:
A price and confidence at a specific slot. This struct can represent either a publisher’s contribution or the outcome of price aggregation.
Product accounts contain metadata for a single product, such as its symbol (“Crypto.BTC/USD”) and its base/quote currencies.
Enums
The type of Pyth account determines what data it contains
Status of any ongoing corporate actions. (still undergoing dev)
The current status of a price feed.
The type of prices associated with a product – each product may have multiple price feeds of different types.
Errors that may be returned by Pyth.
Constants
Statics
The static program ID
Functions
Confirms that a given pubkey is equivalent to the program ID
Returns the program ID
Get a Mapping
account from the raw byte value of a Solana account.
Get a Price
account from the raw byte value of a Solana account.
Get a Product
account from the raw byte value of a Solana account.