-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.py
More file actions
36 lines (32 loc) · 815 Bytes
/
schema.py
File metadata and controls
36 lines (32 loc) · 815 Bytes
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
from pydantic import BaseModel, Field
from typing import Literal, List
Direction = Literal["long", "short"]
class EntryRange(BaseModel):
min: float
max: float
class MultiTFView(BaseModel):
m5: str
m15: str
h1: str
h4: str
d1: str
class SignalPayload(BaseModel):
time_msk: str
symbol: str
price: float
direction: Direction
entry_range: EntryRange
sl: float
tp1: float
tp2: float
rr: float
take_profit_rules: str
break_even_rule: str
multi_tf_view: MultiTFView
why_asset: str
news_context: List[str] = []
market_context: str
validity_minutes: int
cancel_condition: str
technical_rationale: str
disclaimer: str = "Не является инвестсоветом. NFA/DYOR. Управляйте риском."