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>

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,