Skip to main content

initialize_position_tracking

Function initialize_position_tracking 

Source
pub async fn initialize_position_tracking(
    client: &Arc<Client>,
    account_id: AccountId,
    position_tracker: PositionTracker,
) -> Result<()>
Expand description

Initialize position tracking with existing positions.

This fetches all current positions and initializes the position tracker to avoid processing duplicates from execDetails.

§Arguments

  • client - The IB API client
  • account_id - The account ID
  • position_tracker - Shared position tracker to initialize

§Errors

Returns an error if position request fails.