def getAccountFunds(self, exchangeId): message = Message(action='module', subAction='getAccountFunds') message.exception = None message.response = Message() message.response.exchangeId = exchangeId message.response.modId = self.modId self.sendMessage(message, self.pyEventId)
def modMessage(self, subAction, **kwargs): message = Message(action='module', subAction=subAction) message.exception = None message.response = Message() for name, value in kwargs.iteritems(): setattr(message.response, name, value) self.sendMessage(message, self.pyEventId)
def updateBets(self, marketTuple, updateBets): message = Message(action='module', subAction='updateBets') message.exception = None message.response = Message() message.response.marketTuple = marketTuple message.response.updateBets = updateBets message.response.modId = self.modId self.sendMessage(message, self.pyEventId)
def cancelBets(self, marketTuple, cancelBets): message = Message(action='module', subAction='cancelBets') message.exception = None message.response = Message() message.response.marketTuple = marketTuple message.response.cancelBets = cancelBets message.response.modId = self.modId self.sendMessage(message, self.pyEventId)
def placeBets(self, marketTuple, placeBets, fillOrKill=False, fillOrKillTime=15): message = Message(action='module', subAction='placeBets') message.exception = None message.response = Message() message.response.marketTuple = marketTuple message.response.placeBets = placeBets message.response.fillOrKill = fillOrKill message.response.fillOrKillTime = fillOrKillTime message.response.modId = self.modId self.sendMessage(message, self.pyEventId)
def logMessage(self, logMsg): message = Message(action='module', subAction='logMsg') message.exception = None message.response = Message() message.response.logMsg = logMsg self.sendMessage(message, self.pyEventId)