Skip to main content

margin_balance_from_user_stats_with_currency

Function margin_balance_from_user_stats_with_currency 

Source
pub fn margin_balance_from_user_stats_with_currency(
    stats: &LighterUserStats,
    settlement_currency: Currency,
) -> Result<MarginBalance>
Expand description

Builds the cross-margin [MarginBalance] in the supplied settlement currency.

ยงErrors

Returns an error if either Money::from_decimal call rejects the value.