Trait orml_traits::price::PriceProvider

source ·
pub trait PriceProvider<CurrencyId, Price> {
    // Required method
    fn get_price(base: CurrencyId, quote: CurrencyId) -> Option<Price>;
}
Expand description

A trait to provide relative price for two currencies

Required Methods§

source

fn get_price(base: CurrencyId, quote: CurrencyId) -> Option<Price>

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<CurrencyId, Source, Price> PriceProvider<CurrencyId, Price> for DefaultPriceProvider<CurrencyId, Source>
where CurrencyId: Parameter + Member + Copy + MaybeSerializeDeserialize, Source: DataProvider<CurrencyId, Price>, Price: CheckedDiv,