Add Documentation for /forceexit without parameter

This commit is contained in:
Matthias 2022-04-10 09:07:51 +02:00
parent f385e2c2b6
commit 282804463c
2 changed files with 8 additions and 6 deletions

View File

@ -275,9 +275,12 @@ The relative profit of `1.2%` is the average profit per trade.
The relative profit of `15.2 Σ%` is be based on the starting capital - so in this case, the starting capital was `0.00485701 * 1.152 = 0.00738 BTC`.
Starting capital is either taken from the `available_capital` setting, or calculated by using current wallet size - profits.
### /forcesell <trade_id>
### /forceexit <trade_id>
> **BINANCE:** Selling BTC/LTC with limit `0.01650000 (profit: ~-4.07%, -0.00008168)`
> **BINANCE:** Exiting BTC/LTC with limit `0.01650000 (profit: ~-4.07%, -0.00008168)`
!!! Tip
You can get a list of all open trades by calling `/forceexit` without parameter, which will show a list of buttons to simply exit a trade.
### /forcelong <pair> [rate] | /forceshort <pair> [rate]

View File

@ -103,7 +103,6 @@ class Telegram(RPCHandler):
['/count', '/start', '/stop', '/help']
]
# do not allow commands with mandatory arguments and critical cmds
# like /forcesell and /forcebuy
# TODO: DRY! - its not good to list all valid cmds here. But otherwise
# this needs refactoring of the whole telegram module (same
# problem in _help()).
@ -115,7 +114,8 @@ class Telegram(RPCHandler):
r'/stopbuy$', r'/reload_config$', r'/show_config$',
r'/logs$', r'/whitelist$', r'/blacklist$', r'/bl_delete$',
r'/weekly$', r'/weekly \d+$', r'/monthly$', r'/monthly \d+$',
r'/forcebuy$', r'/forcelong$', r'/forceshort$', r'/forcesell$',
r'/forcebuy$', r'/forcelong$', r'/forceshort$',
r'/forcesell$', r'/forceexit$',
r'/edge$', r'/health$', r'/help$', r'/version$']
# Create keys for generation
valid_keys_print = [k.replace('$', '') for k in valid_keys]
@ -929,7 +929,7 @@ class Telegram(RPCHandler):
@authorized_only
def _force_exit(self, update: Update, context: CallbackContext) -> None:
"""
Handler for /forcesell <id>.
Handler for /forceexit <id>.
Sells the given trade at current price
:param bot: telegram bot
:param update: message update
@ -1019,7 +1019,6 @@ class Telegram(RPCHandler):
:param update: message update
:return: None
"""
if context.args:
pair = context.args[0]
price = float(context.args[1]) if len(context.args) > 1 else None