Improve docstring for dry-run wallet method

This commit is contained in:
Matthias 2019-12-15 11:03:40 +01:00
parent b5b6458f12
commit ce845ab092

View File

@ -52,7 +52,12 @@ class Wallets:
return 0
def _update_dry(self) -> None:
""" Update from database in dry-run mode"""
"""
Update from database in dry-run mode
- Apply apply profits of closed trades on top of stake amount
- Subtract currently tied up stake_amount in open trades
- update balances for currencies currently in trades
"""
closed_trades = Trade.get_trades(Trade.is_open.is_(False)).all()
open_trades = Trade.get_trades(Trade.is_open.is_(True)).all()
tot_profit = sum([trade.calc_profit() for trade in closed_trades])