def __init__(self): from marketsim.gen._out.orderbook._remotequeueimpl import RemoteQueueImpl self.name = self.orderbook.label self._digitsToShow = self.orderbook._digitsToShow BookBase.__init__(self, # TODO: dependency tracking RemoteQueueImpl(self.orderbook.bids, self, self.link.down), RemoteQueueImpl(self.orderbook.asks, self, self.link.down))
def __init__(self): from marketsim.gen._out.orderbook._remotequeueimpl import RemoteQueueImpl self.name = self.orderbook.label self._digitsToShow = self.orderbook._digitsToShow BookBase.__init__( self, # TODO: dependency tracking RemoteQueueImpl(self.orderbook.bids, self, self.link.down), RemoteQueueImpl(self.orderbook.asks, self, self.link.down))
def process(self, order): from marketsim.gen._out._iorder import IOrder if isinstance(order, IOrder): BookBase.process(self, order) else: #if 'callback' in dir(order): # order.callback = _(self, order.callback)._sendToDownLink self._upLink.send(_(self.orderbook, order).process)
def __init__(self): self.name = self.orderbook.label self._digitsToShow = self.orderbook._digitsToShow BookBase.__init__( self, # TODO: dependency tracking Queue(self.orderbook.bids, self, self.link.down), Queue(self.orderbook.asks, self, self.link.down))
def __init__(self): """ Initializes empty order book with given tick size """ BookBase.__init__(self, Bids(self.tickSize, self), Asks(self.tickSize, self)) self._asks._digitsToShow = self._digitsToShow self._bids._digitsToShow = self._digitsToShow self._marketOrderFee = None #marketOrderFee self._limitOrderFee = None #limitOrderFee self._cancelOrderFee = None #cancelOrderFee
def __init__(self): """ Initializes empty order book with given tick size """ from marketsim.gen._out.orderbook._asksimpl import AsksImpl from marketsim.gen._out.orderbook._bidsimpl import BidsImpl BookBase.__init__(self, BidsImpl(self.tickSize, self), AsksImpl(self.tickSize, self)) self._asks._digitsToShow = self._digitsToShow self._bids._digitsToShow = self._digitsToShow self._marketOrderFee = None #marketOrderFee self._limitOrderFee = None #limitOrderFee self._cancelOrderFee = None #cancelOrderFee