@openpit/engine
    Preparing search index...

    Class PnlOutcome

    Realized-PnL result: either the amount or a halt reason.

    Exactly one of pnl and haltReason is present.

    Index
    • Constructs a realized-PnL outcome.

      Pass either a computed pnl or a haltReason created by a PnlHaltReason factory.

      Errors

      Throws TypeError unless exactly one of pnl and haltReason is present.

      Parameters

      Returns PnlOutcome

    haltReason: PnlHaltReason | undefined

    The reason why PnL could not be calculated, or undefined when it is available.

    isHalted: boolean

    Whether this accumulator halted during the operation.

    ok: boolean

    Whether this outcome contains authoritative PnL.

    pnl: PnlOutcomeAmount | undefined

    The computed PnL, or undefined when a halt reason is present.

    • Returns void

    • Returns a deep copy of this PnL outcome.

      Returns PnlOutcome

    • Returns void