Skip to content

Possible issue on ib_async for connection to IBGateway, that drops immediately after successful API connection. #169

@edwealth888

Description

@edwealth888

Title: API Connection Drops Immediately After Successful Link to IBGateway

Description:
I'm encountering a persistent issue where ib_async successfully connects to IBGateway, but the connection drops immediately afterward. This behavior occurs consistently and prevents any meaningful interaction with the API.

Environment:

  • OS: Windows 11 Home
  • Python Version: 3.12.10
  • ib_async Version: 2.0.1
  • IBGateway Version: 10.30
  • VSCode Version: 1.103.0
  • Connection Method: TWS API via IBGateway (issue occurs only with IBGateway; TWS works fine)

Steps to Reproduce:

  1. Launch IBGateway and confirm it's running.
  2. Run a basic connection script using ib_async.
  3. Observe that the connection is established briefly, then drops.

Expected Behavior:
The connection should remain active and allow API calls to proceed.

Actual Behavior:
The connection is terminated immediately after being established.

Troubleshooting Attempts:

  • Verified that the same behavior occurs with ib_insync.
  • Tried different ports and client IDs.
  • Ensured firewall and antivirus are not blocking the connection.
  • Confirmed that IBGateway is properly configured and running.
  • Installed ib_async via both GitHub and PyPI.
  • Reproduced the issue across multiple machines.

Additional Notes:
IBKR support suggested this may be a technical issue with the ib_async library. I would appreciate any guidance or fixes the maintainers can offer.

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions