def changeContract(self, contract, newLastPrice): todayDate = date.fromtimestamp(time.time()) sellPrice = Contract.getSellPrice(self, contract) endOfContract = Contract.getEndOfContract(self, contract) takeProfit = Contract.getTakeProfit(self, contract) stopLoss = Contract.getStopLoss(self, contract) sellerId = Contract.getSellerId(self, contract) buyerId = Contract.getBuyerId(self, contract) status = Contract.getStatus(self, contract) numberOfContracts = Contract.getNumberOfAssets(self, contract) Contract.updateContract(self, contract, newLastPrice, sellerId, buyerId, sellPrice, todayDate, endOfContract, takeProfit, stopLoss, status, numberOfContracts)
def getStopLoss(self, idContrato): return Contract.getStopLoss(self, idContrato)