PriceFeedDouble
Last updated
Was this helpful?
Last updated
Was this helpful?
Returns the price of an asset considering two different price feeds.
Written as a generic implementation it can be used, for example, to retrieve the price of WBTC
. Queries BTC/ ETH
feed and multiplies it by the exchange rate between WBTC / BTC
before returning the price that it’s then used by the .
The base units are used to normalize the answer when multiplied by the second price feed rate.
Number of decimals that the answer of this price feed has.
Main price feed where the price is fetched from.
Second price feed where the asset's rate is fetched from.
Returns the price feed's latest value considering the other price feed's rate.