Please view the third-party content disclaimer here.
Prerequisites
- A Solidity contract deployed or ready to deploy on Polygon PoS or Amoy testnet.
- The Chainlink
AggregatorV3Interfaceimported from@chainlink/contracts.
Read a price feed
The contract below reads the latest POL/USD price on the Amoy testnet. To use a different price pair, replace the feed address with any address from the Chainlink Polygon feed list.Next steps
- Browse all available Polygon feed addresses in the Chainlink documentation.
- For more advanced usage, see the Chainlink data feeds docs.