We recommend using one of the following client libraries to consume Pyth prices in an application:
pyth-client-rs (crate) -- Rust library for on-chain Solana programs or off-chain applications.
pyth-neon -- Neon EVM compatibility layer for Ethereum applications running on Solana. This library provides a drop-in oracle replacement for Ethereum applications migrating to Solana, as it implements the same interface as most popular Ethereum oracles.
pyth-client-py (pypi) -- Python client for off-chain applications, such as displaying the Pyth price on a website.
The pyth-examples repository contains an example of both a Solana program and a website that consume Pyth price data using these libraries.
We also recommend reading the Account Structure document in order to understand the Solana accounts used by Pyth. This information will help you identify the accounts that contain the price information you want. A complete list of Pyth accounts can be found here.
If you are developing a Solana program, please see the Best Practices section for some more specific suggestions on how to best use the Pyth price and confidence interval.