Skip to content

Latest commit

 

History

History
17 lines (10 loc) · 1 KB

File metadata and controls

17 lines (10 loc) · 1 KB

Pyth Price Feeds

Pyth is an oracle that publishes low-latency market data from institutional sources onchain. You can use it to read real-world asset prices from Solana programs.

Each asset's price lives in its own Solana account - a price feed.

For example, the SOL/USD price feed on mainnet lives at H6ARHf6YXhGYeQfUzQNGk6rDNnLBQKrenN712K4AQJEG.

You can find more feeds in the Pyth feed list.

To use a feed, pass its account into your instruction handler's context, then read the account's data. A feed contains:

  • A price.
  • A confidence interval.
  • An exponent.

See the Pyth Solana docs for the full data layout and integration guide.