diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index a5601a502..3272059a9 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -110,6 +110,8 @@ class RPC(object): amount=round(trade.amount, 8), close_profit=fmt_close_profit, current_profit=round(current_profit * 100, 2), + initial_stoploss=trade.initial_stop_loss, + stoploss=trade.stop_loss, open_order='({} {} rem={:.8f})'.format( order['type'], order['side'], order['remaining'] ) if order else None, diff --git a/freqtrade/tests/rpc/test_rpc.py b/freqtrade/tests/rpc/test_rpc.py index e6f7ea41e..f9862c9ca 100644 --- a/freqtrade/tests/rpc/test_rpc.py +++ b/freqtrade/tests/rpc/test_rpc.py @@ -58,6 +58,8 @@ def test_rpc_trade_status(default_conf, ticker, fee, markets, mocker) -> None: 'amount': 90.99181074, 'close_profit': None, 'current_profit': -0.59, + 'initial_stoploss': 0.0, + 'stoploss': 0.0, 'open_order': '(limit buy rem=0.00000000)' } == results[0] @@ -78,6 +80,8 @@ def test_rpc_trade_status(default_conf, ticker, fee, markets, mocker) -> None: 'amount': 90.99181074, 'close_profit': None, 'current_profit': ANY, + 'initial_stoploss': 0.0, + 'stoploss': 0.0, 'open_order': '(limit buy rem=0.00000000)' } == results[0]