Beispiel #1
0
    def __init__(self, wrapper):
        EClient.__init__(self, wrapper)
        Event.init(self, Client.events)
        self._logger = logging.getLogger('ib_insync.client')

        # extra optional wrapper methods
        self._priceSizeTick = getattr(wrapper, 'priceSizeTick', None)
        self._tcpDataArrived = getattr(wrapper, 'tcpDataArrived', None)
        self._tcpDataProcessed = getattr(wrapper, 'tcpDataProcessed', None)
 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')
Beispiel #3
0
 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')
Beispiel #4
0
 def __init__(self, *args):
     list.__init__(self, *args)
     Event.init(self, ScanDataList.events)
Beispiel #5
0
 def __init__(self, *args):
     list.__init__(self, *args)
     Event.init(self, BarList.events)
Beispiel #6
0
 def __init__(self, *args, **kwargs):
     Object.__init__(self, *args, **kwargs)
     Event.init(self, Ticker.events)