Pyth
Last updated
Was this helpful?
Last updated
Was this helpful?
is one of the largest first-party Oracle network, delivering real-time data across . The network comprises some of the world’s . These publish proprietary data on-chain for aggregation and distribution to smart contract applications.
The Pyth introduces an innovative low-latency , where users can pull price updates onchain when needed, enabling everyone in the onchain environment to access that data point most efficiently. Pyth network updates the prices every 400ms.
Developers on Cronos EVM have permissionless access to any of for equities, ETFs, commodities, foreign exchange pairs, and cryptocurrencies.
Here is a working example of a contract that fetches the latest price of ETH/USD on the Cronos network. You have to pass for Cronos EVM mainnet/testnet and the desired to fetch the latest price.
The Pyth Network smart contract is available at the following address:
Cronos EVM
The Pyth network provides additional tools to developers, such as
Check out the following links to get started with Pyth.
Here you can fetch the updateData
from Pyth's , which listens to Pythnet and Wormhole for price updates; or you can use the SDK. Check to pull the latest data.
This provides utilities for consuming prices from the Pyth network oracle using Solidity. Also, it contains the that you can use in your libraries to communicate with the Pyth contract.
It is generally recommended to follow the when consuming Pyth data.
For more information, check out the official . There are details on the various functions available for interacting with the Pyth smart contract in the .
Mainnet:
Testnet:
Additionally, click to access the .
Pyth Oracle can be used as a Push oracle by running a scheduler which can update the prices in the backend. Checkout the open source app to get started with the scheduler.
, or
.