oracle
module in InitiaStdLib found at 0x1::oracle
(explorer link).
This module provides a get_price function that you can use to fetch the price
of an asset pair. The asset pair is specified using the pair_id, which is a
string of the format "ASSET1/ASSET2". For example, the example module below
fetches the price of BTC/USD from Connect oracle.
get_price function is then a tuple of
(price, timestamp, decimals), where:
priceis the price of the asset pair multiplied bytimestampis the timestamp of the last updatedecimalsis the number of decimals in the price