2021-06-09 17:51:44 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
2022-08-29 19:41:15 +00:00
|
|
|
class RPCMessageType(str, Enum):
|
2021-06-09 17:51:44 +00:00
|
|
|
STATUS = 'status'
|
|
|
|
WARNING = 'warning'
|
|
|
|
STARTUP = 'startup'
|
2021-09-08 06:20:40 +00:00
|
|
|
|
2022-04-04 17:29:15 +00:00
|
|
|
ENTRY = 'entry'
|
|
|
|
ENTRY_FILL = 'entry_fill'
|
|
|
|
ENTRY_CANCEL = 'entry_cancel'
|
2022-02-13 15:23:01 +00:00
|
|
|
|
2022-04-04 17:10:44 +00:00
|
|
|
EXIT = 'exit'
|
2022-04-04 17:08:31 +00:00
|
|
|
EXIT_FILL = 'exit_fill'
|
2022-04-04 17:07:20 +00:00
|
|
|
EXIT_CANCEL = 'exit_cancel'
|
2022-02-13 15:23:01 +00:00
|
|
|
|
2021-09-20 17:12:59 +00:00
|
|
|
PROTECTION_TRIGGER = 'protection_trigger'
|
2021-09-20 17:23:40 +00:00
|
|
|
PROTECTION_TRIGGER_GLOBAL = 'protection_trigger_global'
|
2021-06-09 17:51:44 +00:00
|
|
|
|
2022-07-26 18:15:49 +00:00
|
|
|
STRATEGY_MSG = 'strategy_msg'
|
|
|
|
|
2022-08-29 19:41:15 +00:00
|
|
|
WHITELIST = 'whitelist'
|
2022-08-30 17:04:16 +00:00
|
|
|
ANALYZED_DF = 'analyzed_df'
|
2022-08-18 16:39:20 +00:00
|
|
|
|
2021-06-09 17:51:44 +00:00
|
|
|
def __repr__(self):
|
|
|
|
return self.value
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.value
|
2022-08-30 17:04:16 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Enum for parsing requests from ws consumers
|
|
|
|
class RPCRequestType(str, Enum):
|
|
|
|
SUBSCRIBE = 'subscribe'
|
2022-09-02 05:52:13 +00:00
|
|
|
|
|
|
|
WHITELIST = 'whitelist'
|
|
|
|
ANALYZED_DF = 'analyzed_df'
|