pub fn oracle_state_unchecked<T: KeyedAccountReader>(
    acc_infos: &OracleAccountInfos<'_, T>,
    base_decimals: u8
) -> Result<OracleState>
Expand description

Returns the price of one native base token, in native quote tokens

Example: The price for SOL at 40 USDC/SOL it would return 0.04 (the unit is USDC-native/SOL-native)

This currently assumes that quote decimals (i.e. decimals for USD) is 6, like for USDC.

The staleness and confidence of the oracle is not checked. Use the functions on OracleState to validate them if needed. That’s why this function is called _unchecked.