2021-06-09 17:51:44 +00:00
|
|
|
from enum import Enum
|
|
|
|
|
|
|
|
|
|
|
|
class RPCMessageType(Enum):
|
|
|
|
STATUS = 'status'
|
|
|
|
WARNING = 'warning'
|
|
|
|
STARTUP = 'startup'
|
2021-09-08 06:20:40 +00:00
|
|
|
|
2021-06-09 17:51:44 +00:00
|
|
|
BUY = 'buy'
|
|
|
|
BUY_FILL = 'buy_fill'
|
|
|
|
BUY_CANCEL = 'buy_cancel'
|
2021-09-08 06:20:40 +00:00
|
|
|
|
2022-02-13 15:23:01 +00:00
|
|
|
SHORT = 'short'
|
|
|
|
SHORT_FILL = 'short_fill'
|
|
|
|
SHORT_CANCEL = 'short_cancel'
|
|
|
|
|
|
|
|
# TODO: The below messagetypes should be renamed to "exit"!
|
|
|
|
# Careful - has an impact on webhooks, therefore needs proper communication
|
2021-06-09 17:51:44 +00:00
|
|
|
SELL = 'sell'
|
|
|
|
SELL_FILL = 'sell_fill'
|
|
|
|
SELL_CANCEL = 'sell_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
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
return self.value
|
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
return self.value
|