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>,
) -> Decimal
Expand description

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