TWSSyncWrapper Class

View as MarkdownOpen in Claude

The TWSSyncWrapper class is produced from the ibapi/sync_wrapper file. Clients looking to utilize the class may seek to replace their typical imports for ibapi/client and ibapi/wrapper with an import for “from ibapi.sync_wrapper import TWSSyncWrapper”.

The TWSSyncWrapper class accepts a single argument, timeout. This will provide a default timeout integer in seconds for all connected functions to work with. If no timeout is specified, a default value of 30 seconds is passed instead.

Each function supports a timeout argument for unique endpoint timeout behavior.

from ibapi.sync_wrapper import TWSSyncWrapper
app = TWSSyncWrapper(timeout=30)