-
Notifications
You must be signed in to change notification settings - Fork 26
/
models.py
53 lines (32 loc) · 976 Bytes
/
models.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
from typing import Any, Dict, Optional
from pydantic import BaseModel
class HummingbotInstanceConfig(BaseModel):
instance_name: str
credentials_profile: str
image: str = "hummingbot/hummingbot:latest"
script: Optional[str] = None
script_config: Optional[str] = None
class ImageName(BaseModel):
image_name: str
class Script(BaseModel):
name: str
content: str
class ScriptConfig(BaseModel):
name: str
content: Dict[str, Any] # YAML content represented as a dictionary
class BotAction(BaseModel):
bot_name: str
class StartBotAction(BotAction):
log_level: str = None
script: str = None
conf: str = None
async_backend: bool = False
class StopBotAction(BotAction):
skip_order_cancellation: bool = False
async_backend: bool = False
class ImportStrategyAction(BotAction):
strategy: str
class ConfigureBotAction(BotAction):
params: dict
class ShortcutAction(BotAction):
params: list