Exemple #1
0
 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)
Exemple #2
0
 def getStatus(self, idContrato):
     return Contract.getStatus(self, idContrato)