Merge branch 'master' of https://github.com/gcarq/freqtrade into develop

This commit is contained in:
gcarq
2017-09-08 16:27:00 +02:00
7 changed files with 44 additions and 22 deletions

View File

@@ -151,7 +151,7 @@ def _profit(bot: Bot, update: Update) -> None:
profit_amounts.append((profit / 100) * trade.btc_amount)
profits.append(profit)
bp_pair, bp_rate = Trade.session.query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum')) \
bp_pair, bp_rate = Trade.session().query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum')) \
.filter(Trade.is_open.is_(False)) \
.group_by(Trade.pair) \
.order_by('profit_sum DESC') \
@@ -272,7 +272,7 @@ def _performance(bot: Bot, update: Update) -> None:
send_msg('`trader is not running`', bot=bot)
return
pair_rates = Trade.session.query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum')) \
pair_rates = Trade.session().query(Trade.pair, func.sum(Trade.close_profit).label('profit_sum')) \
.filter(Trade.is_open.is_(False)) \
.group_by(Trade.pair) \
.order_by('profit_sum DESC') \