pub trait AggregatedPriceOracle<AssetId, BlockNumber, Price> {
    type Error;

    fn get_price(
        asset_a: AssetId,
        asset_b: AssetId,
        period: OraclePeriod,
        source: Source
    ) -> Result<(Price, BlockNumber), Self::Error>; fn get_price_weight() -> Weight; }
Expand description

An oracle returning a price aggregated over period with the associated oracle age (to allow judging whether the oracle had a chance to settle yet).

Required Associated Types§

Required Methods§

Implementations on Foreign Types§

Default implementation of the oracle trait that always returns Err.

Implementors§

Mock implementation of the oracle trait that always returns Price::one() and oracle age of BlockNumber::one().