Function check_external_position_change
Source pub async fn check_external_position_change(
position_tracker: &PositionTracker,
contract_id: i32,
new_quantity: Decimal,
) -> Option<(bool, Decimal)>
Expand description
Check if a position update represents an external change (e.g., option exercise).
§Arguments
position_tracker - Shared position tracker
contract_id - IB contract ID
new_quantity - New position quantity
§Returns
Returns (is_external_change, old_quantity) if this is an external change.