๐Ÿ“ˆ Price Feeds

AggregatorV3Consumer

The latest round data returned by ETH/USD price feed contract on sepolia

Loading...

FeedRegistry

Enter a supported mainnet token address to see the latest price quote in USD

Getting Started

Chainlink price feeds bring off chain price quotes on chain using a decentralized network of oracles. The FeedRegistry contract is only avaible on mainnet, but the price feed addresses that power the AggregatorV3Interface are available on a wide range of networks

Steps

  1. Import AggregatorV3Interface into your smart contract
  2. Declare a state variable of type AggregatorV3Interface
  3. Find price feed address by network and asset pair
  4. Instantiate the variable using the price feed address
  5. Call .latestRoundData() and extract the answer

Details

  • The quote returned by the price feed contract has a specified number of decimals
  • The quote returned by the price feed contract is only updated if the price deviates beyond a specified threshold or if a certain amount of time has passed since the last update