Skip to content
This repository was archived by the owner on Mar 14, 2024. It is now read-only.
This repository was archived by the owner on Mar 14, 2024. It is now read-only.

reqAccountSummary often times out #689

@thorpep138

Description

@thorpep138

Hey team--

I noticed that when I call reqAccountSummary it often times out, even when I give a timeout of 2 minutes. Does anyone know why this might be? Here is the relevant code snippet:

def get_account_balance_with_timeout(self, timeout):
        # Request account summary
        ib.reqAccountSummary()
        
        # Wait for the account summary update with a timeout
        if not ib.waitOnUpdate(timeout=timeout):  
            raise Exception("Fetching account balance timed out.")

        # Filter for TotalCashBalance
        account_summary = ib.accountSummary()
        for item in account_summary:
            if item.tag == 'TotalCashBalance' and item.currency == 'USD':
                return item.value

        return None

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions