mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
set close_date on sell_order update
This commit is contained in:
parent
ba485fe2b2
commit
32327c45c2
|
@ -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']))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user