set close_date on sell_order update

This commit is contained in:
gcarq 2017-11-07 22:26:44 +01:00
parent ba485fe2b2
commit 32327c45c2

View File

@ -92,6 +92,7 @@ class Trade(_DECL_BASE):
# Set close rate and set actual profit # Set close rate and set actual profit
self.close_rate = order['rate'] self.close_rate = order['rate']
self.close_profit = self.calc_profit() self.close_profit = self.calc_profit()
self.close_date = datetime.utcnow()
else: else:
raise ValueError('Unknown order type: {}'.format(order['type'])) raise ValueError('Unknown order type: {}'.format(order['type']))