Chainlink Oracle Events – What Events are Emitted and Which to Listen for Price Updates

chainlinkoff-chainoraclesproxy-contractstokens

I am looking for events which are emitted by Chainlink oracles when price updates occur. E.g. the Aggregator for ETH/USD price (https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419) is used by many smart contracts to retrieve the current ETH/USD price from off-chain. However, i cannot find any emitted events i should listen to, to know when price updates occur. What is the preferred way to listen for price updates on Chainlink Oracles and what transactions cause the price to actually update?

Best Answer

The address that you mentioned is actually the Price Feed and not the Aggregator contract itself. The Price Feed acts as a "Proxy" contract that reads the submitted price data on the current and past aggregator contracts. The appropriate events can be found on the Aggregator contracts only since the price updates are reported there.

You can get the current aggregator by calling the aggregator() function from the Price Feed contract https://etherscan.io/address/0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419#readContract.

As of now the aggregator is 0x37bC7498f4FF12C19678ee8fE19d713b87F6a9e6 and the event AnswerUpdated should contain all the topics that you need. https://etherscan.io/address/0x37bC7498f4FF12C19678ee8fE19d713b87F6a9e6#events

Related Topic