Use pct instead of _perc
This commit is contained in:
parent
18d2587800
commit
3e3cce4559
@ -136,10 +136,10 @@ class RPC:
|
|||||||
trade_dict.update(dict(
|
trade_dict.update(dict(
|
||||||
base_currency=self._freqtrade.config['stake_currency'],
|
base_currency=self._freqtrade.config['stake_currency'],
|
||||||
close_profit=trade.close_profit or None,
|
close_profit=trade.close_profit or None,
|
||||||
close_profit_perc=fmt_close_profit,
|
close_profit_pct=fmt_close_profit,
|
||||||
current_rate=current_rate,
|
current_rate=current_rate,
|
||||||
current_profit=current_profit,
|
current_profit=current_profit,
|
||||||
current_profit_perc=round(current_profit * 100, 2),
|
current_profit_pct=round(current_profit * 100, 2),
|
||||||
open_order='({} {} rem={:.8f})'.format(
|
open_order='({} {} rem={:.8f})'.format(
|
||||||
order['type'], order['side'], order['remaining']
|
order['type'], order['side'], order['remaining']
|
||||||
) if order else None,
|
) if order else None,
|
||||||
|
@ -215,8 +215,8 @@ class Telegram(RPC):
|
|||||||
"*Open Rate:* `{open_rate:.8f}`",
|
"*Open Rate:* `{open_rate:.8f}`",
|
||||||
"*Close Rate:* `{close_rate}`" if r['close_rate'] else "",
|
"*Close Rate:* `{close_rate}`" if r['close_rate'] else "",
|
||||||
"*Current Rate:* `{current_rate:.8f}`",
|
"*Current Rate:* `{current_rate:.8f}`",
|
||||||
"*Close Profit:* `{close_profit_perc}`" if r['close_profit_perc'] else "",
|
"*Close Profit:* `{close_profit_pct}`" if r['close_profit_pct'] else "",
|
||||||
"*Current Profit:* `{current_profit_perc:.2f}%`",
|
"*Current Profit:* `{current_profit_pct:.2f}%`",
|
||||||
|
|
||||||
# Adding initial stoploss only if it is different from stoploss
|
# Adding initial stoploss only if it is different from stoploss
|
||||||
"*Initial Stoploss:* `{initial_stop_loss:.8f}` " +
|
"*Initial Stoploss:* `{initial_stop_loss:.8f}` " +
|
||||||
|
@ -76,9 +76,9 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
|
|||||||
'amount': 91.07468124,
|
'amount': 91.07468124,
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
'close_profit': None,
|
'close_profit': None,
|
||||||
'close_profit_perc': None,
|
'close_profit_pct': None,
|
||||||
'current_profit': -0.00408133,
|
'current_profit': -0.00408133,
|
||||||
'current_profit_perc': -0.41,
|
'current_profit_pct': -0.41,
|
||||||
'stop_loss': 0.0,
|
'stop_loss': 0.0,
|
||||||
'initial_stop_loss': 0.0,
|
'initial_stop_loss': 0.0,
|
||||||
'initial_stop_loss_pct': None,
|
'initial_stop_loss_pct': None,
|
||||||
@ -124,9 +124,9 @@ def test_rpc_trade_status(default_conf, ticker, fee, mocker) -> None:
|
|||||||
'amount': 91.07468124,
|
'amount': 91.07468124,
|
||||||
'stake_amount': 0.001,
|
'stake_amount': 0.001,
|
||||||
'close_profit': None,
|
'close_profit': None,
|
||||||
'close_profit_perc': None,
|
'close_profit_pct': None,
|
||||||
'current_profit': ANY,
|
'current_profit': ANY,
|
||||||
'current_profit_perc': ANY,
|
'current_profit_pct': ANY,
|
||||||
'stop_loss': 0.0,
|
'stop_loss': 0.0,
|
||||||
'initial_stop_loss': 0.0,
|
'initial_stop_loss': 0.0,
|
||||||
'initial_stop_loss_pct': None,
|
'initial_stop_loss_pct': None,
|
||||||
|
@ -501,10 +501,10 @@ def test_api_status(botclient, mocker, ticker, fee, markets):
|
|||||||
'close_date_hum': None,
|
'close_date_hum': None,
|
||||||
'close_timestamp': None,
|
'close_timestamp': None,
|
||||||
'close_profit': None,
|
'close_profit': None,
|
||||||
'close_profit_perc': None,
|
'close_profit_pct': None,
|
||||||
'close_rate': None,
|
'close_rate': None,
|
||||||
'current_profit': -0.00408133,
|
'current_profit': -0.00408133,
|
||||||
'current_profit_perc': -0.41,
|
'current_profit_pct': -0.41,
|
||||||
'current_rate': 1.099e-05,
|
'current_rate': 1.099e-05,
|
||||||
'initial_stop_loss': 0.0,
|
'initial_stop_loss': 0.0,
|
||||||
'initial_stop_loss_pct': None,
|
'initial_stop_loss_pct': None,
|
||||||
|
@ -166,9 +166,9 @@ def test_status(default_conf, update, mocker, fee, ticker,) -> None:
|
|||||||
'current_rate': 1.098e-05,
|
'current_rate': 1.098e-05,
|
||||||
'amount': 90.99181074,
|
'amount': 90.99181074,
|
||||||
'stake_amount': 90.99181074,
|
'stake_amount': 90.99181074,
|
||||||
'close_profit_perc': None,
|
'close_profit_pct': None,
|
||||||
'current_profit': -0.0059,
|
'current_profit': -0.0059,
|
||||||
'current_profit_perc': -0.59,
|
'current_profit_pct': -0.59,
|
||||||
'initial_stop_loss': 1.098e-05,
|
'initial_stop_loss': 1.098e-05,
|
||||||
'stop_loss': 1.099e-05,
|
'stop_loss': 1.099e-05,
|
||||||
'sell_order_status': None,
|
'sell_order_status': None,
|
||||||
|
Loading…
Reference in New Issue
Block a user