pub trait PriceOracle<AssetId> {
    type Price;

    fn price(
        asset_a: AssetId,
        asset_b: AssetId,
        period: OraclePeriod
    ) -> Option<Self::Price>; }
Expand description

Implementers of this trait provide the price for an arbitrary asset pair.

Should return None if no price is available.

Required Associated Types§

Required Methods§

Implementors§