Constructs a policy-tagged account-level PnL outcome.
policyGroupId accepts an integer in 0..=65535. accountId accepts
an AccountId object or a number | bigint | string.
Pass either a computed pnl or a haltReason created by a
PnlHaltReason factory.
Throws TypeError unless exactly one of pnl and haltReason is
present, TypeError/RangeError when policyGroupId is invalid, or
AccountIdError when the account is invalid.
Optionalpnl: PnlOutcomeAmount | nullOptionalhalt_reason: PnlHaltReason | nullReadonlyaccountThe account that owns the realized-PnL ledger.
ReadonlyhaltThe reason why PnL could not be calculated, or undefined when it is
available.
ReadonlyisWhether this account accumulator halted during the operation.
ReadonlyokWhether this outcome contains authoritative PnL.
ReadonlypnlThe computed PnL, or undefined when a halt reason is present.
ReadonlypolicyThe policy-group tag of the policy that produced this outcome.
Returns a deep copy of this account-level PnL outcome.
Policy-tagged account-level realized-PnL outcome.
SpotFunds denominates both the delta and absolute value in the account currency.
SpotFunds engages the account line only for a realizing fill or a nonzero fee. Opening, same-direction, and zero-quantity fills without a nonzero fee, plus zero fees alone, emit no account outcome and require no account currency or FX for this line. A nonzero fee engages both the position and account rows regardless of fill quantity.
SpotFunds emits a halted outcome only for the report that transitions the account accumulator to halted. Later reports omit the unchanged halt until its account PnL is explicitly force-set. Re-arming a position does not re-arm account PnL, and re-arming account PnL does not re-arm any position.
Exactly one of
pnlandhaltReasonis present.