OpenPit C++ SDK
C++17 SDK for the OpenPit pre-trade risk engine
openpit::accountadjustment::AccountPnlOutcome Class Reference

Account-level realized-PnL result: either the amount or a halt reason. More...

Collaboration diagram for openpit::accountadjustment::AccountPnlOutcome:

Public Member Functions

 AccountPnlOutcome (PnlHaltReason reason, param::AccountId outcomeAccountId, param::GroupId outcomePolicyGroupId)
 
 AccountPnlOutcome (PnlOutcomeAmount outcomeAmount, param::AccountId outcomeAccountId, param::GroupId outcomePolicyGroupId)
 
const PnlOutcomeAmountAmount () const noexcept
 
std::optional< PnlHaltReasonHaltReason () const noexcept
 

Public Attributes

param::AccountId accountId
 Account that owns the realized-PnL ledger. More...
 
param::GroupId policyGroupId
 Policy group of the producer that owns the ledger. More...
 

Detailed Description

Account-level realized-PnL result: either the amount or a halt reason.

A newly halted calculation emits its reason once; later checks can reject or block on the stored halt without emitting another account outcome. A manager explicitly force-sets the account PnL to re-arm it. Position accumulators are independent. Account-level realized-PnL outcome.

Constructor & Destructor Documentation

◆ AccountPnlOutcome() [1/2]

openpit::accountadjustment::AccountPnlOutcome::AccountPnlOutcome ( PnlOutcomeAmount  outcomeAmount,
param::AccountId  outcomeAccountId,
param::GroupId  outcomePolicyGroupId 
)
inline

◆ AccountPnlOutcome() [2/2]

openpit::accountadjustment::AccountPnlOutcome::AccountPnlOutcome ( PnlHaltReason  reason,
param::AccountId  outcomeAccountId,
param::GroupId  outcomePolicyGroupId 
)
inline

Member Function Documentation

◆ Amount()

const PnlOutcomeAmount* openpit::accountadjustment::AccountPnlOutcome::Amount ( ) const
inlinenoexcept

◆ HaltReason()

std::optional<PnlHaltReason> openpit::accountadjustment::AccountPnlOutcome::HaltReason ( ) const
inlinenoexcept

Member Data Documentation

◆ accountId

param::AccountId openpit::accountadjustment::AccountPnlOutcome::accountId

Account that owns the realized-PnL ledger.

◆ policyGroupId

param::GroupId openpit::accountadjustment::AccountPnlOutcome::policyGroupId

Policy group of the producer that owns the ledger.