I went through the documentation of Chainlink data feeds and saw we can get the latest price using latestRoundData()
function from AggregatorV3Interface
.
The documentation states the price update happens in two threshold, 'Deviation' and 'Heartbeat'. So the deviation for 'ETH/USD' is 0.5% and 1 hour heartbeat time.
But I see Pancakeswap.finance's prediction game uses Chainlink oracle to get latest price of 'BNB/USD' in real-time. But the deviation is not as near as 1% (as mentioned in https://docs.chain.link/docs/binance-smart-chain-addresses/) and it updates price in real-time even less than a minute.
May I know how to update price in real-time?
do we use keepers that keep a watch every second? or is using 'fluxmonitor' (as mentioned here Timed Chainlink oracle call) a good solution?
or is there a way to get price every time there is a price change (even in cents)?