Trait pallet_price_feed::pallet::PriceFeed[][src]

pub trait PriceFeed<AssetId> {
    fn get_price(base: AssetId) -> Result<Price, DispatchError>;
fn get_relative_price_pair(
        base: AssetId,
        quote: AssetId
    ) -> Result<AssetPricePair<AssetId>, DispatchError>; }
Expand description

An interface to access price data

Required methods

Returns the current price for the given asset measured in the constant denominating asset which is used as the quote currency, whereas the price of the base Asset will be the base currency for the price pair. Note: this returns the price for 1 basic unit

Returns the current price pair for the prices of the base and quote asset in the form of base/quote

Implementors