Added missing webhook config params to constants

This commit is contained in:
Spat 2021-11-29 18:17:59 +11:00
parent 29180a1d2b
commit 018407852a
2 changed files with 6 additions and 4 deletions

View File

@ -50,6 +50,8 @@ USERPATH_STRATEGIES = 'strategies'
USERPATH_NOTEBOOKS = 'notebooks'
TELEGRAM_SETTING_OPTIONS = ['on', 'off', 'silent']
WEBHOOK_FORMAT_OPTIONS = ['form', 'json', 'raw']
ENV_VAR_PREFIX = 'FREQTRADE__'
NON_OPEN_EXCHANGE_STATES = ('cancelled', 'canceled', 'closed', 'expired')
@ -312,12 +314,16 @@ CONF_SCHEMA = {
'type': 'object',
'properties': {
'enabled': {'type': 'boolean'},
'url': {'type': 'string'},
'format': {'type': 'string', 'enum': WEBHOOK_FORMAT_OPTIONS, 'default': 'form'},
'retries': {'type': 'integer', 'minimum': 0},
'retry_delay': {'type': 'number', 'minimum': 0},
'webhookbuy': {'type': 'object'},
'webhookbuycancel': {'type': 'object'},
'webhookbuyfill': {'type': 'object'},
'webhooksell': {'type': 'object'},
'webhooksellcancel': {'type': 'object'},
'webhooksellfill': {'type': 'object'},
'webhookstatus': {'type': 'object'},
},
},

View File

@ -33,10 +33,6 @@ class Webhook(RPCHandler):
self._retries = self._config['webhook'].get('retries', 0)
self._retry_delay = self._config['webhook'].get('retry_delay', 0.1)
if not (self._format in ['form', 'json', 'raw']):
raise NotImplementedError('Unknown webhook format `{}`, possible values are '
'`form` (default), `json`, and `raw`'.format(self._format))
def cleanup(self) -> None:
"""
Cleanup pending module resources.