Skip to main content

subscribe_pnl

Function subscribe_pnl 

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

Subscribe to PnL updates for the account.

This spawns a background task to handle PnL updates.

§Arguments

  • client - The IB API client
  • account_id - The account ID

§Errors

Returns an error if subscription fails.