Skip to main content

settlement_ledger_delta_for_margin_mode

Function settlement_ledger_delta_for_margin_mode 

Source
pub fn settlement_ledger_delta_for_margin_mode(
    margin_mode: MarginMode,
    settlement_value: Decimal,
    net_pnl: Option<Decimal>,
    context: &str,
) -> Result<Decimal>
Expand description

Compute the ledger cash delta for a settlement based on margin mode. Standard mode uses settlement_value; portfolio mode uses net_pnl.