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: null | PnlOutcomeAmountOptionalhalt_reason: null | PnlHaltReasonReadonlyaccountThe 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 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.