pub fn settlement_cash_delta_for_margin_mode(
margin_mode: MarginMode,
settlement_value: Decimal,
net_pnl: Option<Decimal>,
context: &str,
) -> Result<Decimal, SettlementError>Expand description
Calculate the cash delta that settlement should apply for a margin mode.