2018-02-04 00:10:58 +00:00
|
|
|
# pragma pylint: disable=too-few-public-methods
|
|
|
|
|
|
|
|
"""
|
|
|
|
Bot state constant
|
|
|
|
"""
|
2018-12-25 13:05:40 +00:00
|
|
|
from enum import Enum
|
2018-02-04 00:10:58 +00:00
|
|
|
|
|
|
|
|
2018-12-25 13:05:40 +00:00
|
|
|
class State(Enum):
|
2018-02-04 00:10:58 +00:00
|
|
|
"""
|
2018-06-09 02:29:48 +00:00
|
|
|
Bot application states
|
2018-02-04 00:10:58 +00:00
|
|
|
"""
|
2018-12-25 13:05:40 +00:00
|
|
|
RUNNING = 1
|
|
|
|
STOPPED = 2
|
|
|
|
RELOAD_CONF = 3
|
2018-12-25 13:23:59 +00:00
|
|
|
|
|
|
|
|
|
|
|
class RunMode(Enum):
|
|
|
|
"""
|
|
|
|
Bot running mode (backtest, hyperopt, ...)
|
2019-05-28 17:25:01 +00:00
|
|
|
can be "live", "dry-run", "backtest", "edge", "hyperopt".
|
2018-12-25 13:23:59 +00:00
|
|
|
"""
|
|
|
|
LIVE = "live"
|
|
|
|
DRY_RUN = "dry_run"
|
|
|
|
BACKTEST = "backtest"
|
2019-05-28 17:25:01 +00:00
|
|
|
EDGE = "edge"
|
2018-12-25 13:23:59 +00:00
|
|
|
HYPEROPT = "hyperopt"
|
2019-11-01 14:39:25 +00:00
|
|
|
UTIL_EXCHANGE = "util_exchange"
|
|
|
|
UTIL_NO_EXCHANGE = "util_no_exchange"
|
2019-08-31 13:14:57 +00:00
|
|
|
PLOT = "plot"
|
2019-11-01 14:39:25 +00:00
|
|
|
OTHER = "other"
|
2019-11-01 15:42:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
TRADING_MODES = [RunMode.LIVE, RunMode.DRY_RUN]
|
|
|
|
OPTIMIZE_MODES = [RunMode.BACKTEST, RunMode.EDGE, RunMode.HYPEROPT]
|
|
|
|
NON_UTIL_MODES = TRADING_MODES + OPTIMIZE_MODES
|