nautilus_common::xrate

Function get_exchange_rate

source
pub fn get_exchange_rate(
    from_currency: Currency,
    to_currency: Currency,
    price_type: PriceType,
    quotes_bid: HashMap<Symbol, Decimal>,
    quotes_ask: HashMap<Symbol, Decimal>,
) -> Result<Decimal>
Expand description

Returns the calculated exchange rate for the given price type using the given dictionary of bid and ask quotes.