sell_cancel -> exit_cancel

This commit is contained in:
Matthias 2022-04-04 19:07:20 +02:00
parent 6a0110aa3c
commit 8b33d9cdb2
9 changed files with 10 additions and 10 deletions

View File

@ -153,7 +153,7 @@
},
"sell_fill": "on",
"buy_cancel": "on",
"sell_cancel": "on",
"exit_cancel": "on",
"protection_trigger": "off",
"protection_trigger_global": "on"
},

View File

@ -93,7 +93,7 @@ Example configuration showing the different settings:
"custom_exit": "silent"
},
"buy_cancel": "silent",
"sell_cancel": "on",
"exit_cancel": "on",
"buy_fill": "off",
"sell_fill": "off",
"protection_trigger": "off",

View File

@ -298,7 +298,7 @@ CONF_SCHEMA = {
'enum': TELEGRAM_SETTING_OPTIONS
}
},
'sell_cancel': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'exit_cancel': {'type': 'string', 'enum': TELEGRAM_SETTING_OPTIONS},
'sell_fill': {
'type': 'string',
'enum': TELEGRAM_SETTING_OPTIONS,

View File

@ -16,7 +16,7 @@ class RPCMessageType(Enum):
SELL = 'sell'
SELL_FILL = 'sell_fill'
SELL_CANCEL = 'sell_cancel'
EXIT_CANCEL = 'exit_cancel'
PROTECTION_TRIGGER = 'protection_trigger'
PROTECTION_TRIGGER_GLOBAL = 'protection_trigger_global'

View File

@ -1497,7 +1497,7 @@ class FreqtradeBot(LoggingMixin):
gain = "profit" if profit_ratio > 0 else "loss"
msg = {
'type': RPCMessageType.SELL_CANCEL,
'type': RPCMessageType.EXIT_CANCEL,
'trade_id': trade.id,
'exchange': trade.exchange.capitalize(),
'pair': trade.pair,

View File

@ -316,7 +316,7 @@ class Telegram(RPCHandler):
message = self._format_sell_msg(msg)
elif msg_type in (RPCMessageType.BUY_CANCEL, RPCMessageType.SHORT_CANCEL,
RPCMessageType.SELL_CANCEL):
RPCMessageType.EXIT_CANCEL):
msg['message_side'] = 'enter' if msg_type in [RPCMessageType.BUY_CANCEL,
RPCMessageType.SHORT_CANCEL] else 'exit'
message = ("\N{WARNING SIGN} *{exchange}:* "

View File

@ -55,7 +55,7 @@ class Webhook(RPCHandler):
valuedict = whconfig.get('webhookexit', whconfig.get('webhooksell', None))
elif msg['type'] == RPCMessageType.SELL_FILL:
valuedict = whconfig.get('webhookexitfill', whconfig.get('webhookexitfill', None))
elif msg['type'] == RPCMessageType.SELL_CANCEL:
elif msg['type'] == RPCMessageType.EXIT_CANCEL:
valuedict = whconfig.get('webhookexitcancel',
whconfig.get('webhooksellcancel', None))
elif msg['type'] in (RPCMessageType.STATUS,

View File

@ -1996,7 +1996,7 @@ def test_send_msg_sell_cancel_notification(default_conf, mocker) -> None:
old_convamount = telegram._rpc._fiat_converter.convert_amount
telegram._rpc._fiat_converter.convert_amount = lambda a, b, c: -24.812
telegram.send_msg({
'type': RPCMessageType.SELL_CANCEL,
'type': RPCMessageType.EXIT_CANCEL,
'trade_id': 1,
'exchange': 'Binance',
'pair': 'KEY/ETH',
@ -2008,7 +2008,7 @@ def test_send_msg_sell_cancel_notification(default_conf, mocker) -> None:
msg_mock.reset_mock()
telegram.send_msg({
'type': RPCMessageType.SELL_CANCEL,
'type': RPCMessageType.EXIT_CANCEL,
'trade_id': 1,
'exchange': 'Binance',
'pair': 'KEY/ETH',

View File

@ -257,7 +257,7 @@ def test_send_msg_webhook(default_conf, mocker):
# Test sell cancel
msg_mock.reset_mock()
msg = {
'type': RPCMessageType.SELL_CANCEL,
'type': RPCMessageType.EXIT_CANCEL,
'exchange': 'Binance',
'pair': 'ETH/BTC',
'gain': "profit",