def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) if not self.ibcPath: self.ibcPath = '/opt/ibc' if os.sys.platform != 'win32' \ else 'C:\\IBC' self._proc = None self._monitor = None self._logger = logging.getLogger('ib_insync.IBC')
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) assert self.controller assert self.retryDelay > 0 self.ib = IB() self.ib.client.apiError = self.onApiError self.ib.setCallback('error', self.onError) self._watcher = asyncio.ensure_future(self.watchAsync()) self._logger = logging.getLogger('ib_insync.Watchdog')
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) Event.init(self, Watchdog.events) if not self.controller: raise ValueError('No controller supplied') if not self.ib: raise ValueError('No IB instance supplied') if self.ib.isConnected(): raise ValueError('IB instance must not be connected') assert 0 < self.appTimeout < 60 assert self.retryDelay > 0 self._runner = None self._logger = logging.getLogger('ib_insync.Watchdog')
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) Event.init(self, Watchdog.events) if not self.controller: raise ValueError('No controller supplied') if not self.ib: raise ValueError('No IB instance supplied') if self.ib.isConnected(): raise ValueError('IB instance must not be connected') assert 0 < self.appTimeout < 60 assert self.retryDelay > 0 self.ib.errorEvent += self.onError self.ib.disconnectedEvent += self.flush self._watcher = asyncio.ensure_future(self.watchAsync()) self._logger = logging.getLogger('ib_insync.Watchdog')
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) self.startingEvent = Event('startingEvent') self.startedEvent = Event('startedEvent') self.stoppingEvent = Event('stoppingEvent') self.stoppedEvent = Event('stoppedEvent') self.softTimeoutEvent = Event('softTimeoutEvent') self.hardTimeoutEvent = Event('hardTimeoutEvent') if not self.controller: raise ValueError('No controller supplied') if not self.ib: raise ValueError('No IB instance supplied') if self.ib.isConnected(): raise ValueError('IB instance must not be connected') assert 0 < self.appTimeout < 60 assert self.retryDelay > 0 self._runner = None self._logger = logging.getLogger('ib_insync.Watchdog')
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) self.updateEvent = TickerUpdateEvent('updateEvent')
def __eq__(self, other): return self.isHashable() and isinstance(other, Contract) and \ self.conId == other.conId \ or Object.__eq__(self, other)
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) Event.init(self, Ticker.events)
def __init__(self, *args, **kwargs): Object.__init__(self, *args, **kwargs) self._proc = None self._monitor = None self._logger = logging.getLogger('ib_insync.IBController')
def __eq__(self, other): return (self.conId and isinstance(other, Contract) and (self.conId == other.conId) or Object.__eq__(self, other))