How to Use Real-Time Price Data
Guides for using Pyth real-time price feeds
The following guides demonstrate how to consume Pyth real-time prices on various blockchains. These guides are intended for developers building on-chain applications that need the latest price data, i.e., the price data must be on the blockchain.
Pyth price feeds are available on 100+ blockchain ecosystems. Check out the complete list of chains and implementation contract addresses at Contract Addresses. If your blockchain is not supported, please ask in the dev-forum.
Choosing Your Integration Method
Pull integration is the default choice for most applications. In this integration, the application retrieves price data from a webservice and submits it to an on-chain smart contact as part of the transaction. This integration provides the lowest-latency access to Pyth price data.
Push integration is for applications that don't want to pull prices in every transaction and prefer a purely on-chain integration.
All feeds are available through both integration methods. However, to use pull integration, the application needs to submit the prices to the on-chain smart contract as part of the transaction. Check out the Pull Integration section below to get started.
Pull Integration
Consult the relevant ecosystem guide to get started using pull integration:
Push Integration
To consume real-time price data using push integration, check out the following guides:
This guide will walk you through the steps to use real-time price data using push integration in every ecosystem.
Off-Chain Applications
Pyth price feeds can also be used in off-chain applications. For example, an application may need to show real-time asset prices on a website. Developers building such applications can consult the following guide:
To fetch historical prices, application developers can check out the Use Historical Price Data guide.