kaq-quant-common 0.2.7__py3-none-any.whl → 0.2.8__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,17 @@
1
- # 定义model
2
- from typing import Optional
3
-
4
- from pydantic import BaseModel
5
-
6
-
7
- #
8
- class InstructionRequestBase(BaseModel):
9
- # 时间
10
- event_time: Optional[int] = None
11
- # 任务id
12
- task_id: Optional[str] = None
13
-
14
-
15
- class InstructionResponseBase(BaseModel):
16
- # 时间
17
- event_time: Optional[int] = None
1
+ # 定义model
2
+ from typing import Optional
3
+
4
+ from pydantic import BaseModel
5
+
6
+
7
+ #
8
+ class InstructionRequestBase(BaseModel):
9
+ # 时间
10
+ event_time: Optional[int] = None
11
+ # 任务id
12
+ task_id: Optional[str] = None
13
+
14
+
15
+ class InstructionResponseBase(BaseModel):
16
+ # 时间
17
+ event_time: Optional[int] = None
@@ -1,32 +1,32 @@
1
- from enum import Enum
2
-
3
- from . import InstructionRequestBase, InstructionResponseBase
4
-
5
- # ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 划转
6
-
7
-
8
- # 划转类型
9
- class TransferType(int, Enum):
10
- # 资金&现货
11
- FUNDING_SPOT = 1
12
- # 资金&合约
13
- FUNDING_FUTURES = 2
14
- # 合约&现货
15
- SPOT_FUTURES = 3
16
-
17
-
18
- # 划转请求
19
- class TransferRequest(InstructionRequestBase):
20
- # 划转类型
21
- type: TransferType
22
- # 资产/币种
23
- assets: str
24
- # 划转数量
25
- amount: float
26
- # 划转方向 1正向,2反向
27
- direction: int
28
-
29
-
30
- # 划转响应
31
- class TransferResponse(InstructionResponseBase):
32
- transfer_id: str
1
+ from enum import Enum
2
+
3
+ from . import InstructionRequestBase, InstructionResponseBase
4
+
5
+ # ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓ 划转
6
+
7
+
8
+ # 划转类型
9
+ class TransferType(int, Enum):
10
+ # 资金&现货
11
+ FUNDING_SPOT = 1
12
+ # 资金&合约
13
+ FUNDING_FUTURES = 2
14
+ # 合约&现货
15
+ SPOT_FUTURES = 3
16
+
17
+
18
+ # 划转请求
19
+ class TransferRequest(InstructionRequestBase):
20
+ # 划转类型
21
+ type: TransferType
22
+ # 资产/币种
23
+ assets: str
24
+ # 划转数量
25
+ amount: float
26
+ # 划转方向 1正向,2反向
27
+ direction: int
28
+
29
+
30
+ # 划转响应
31
+ class TransferResponse(InstructionResponseBase):
32
+ transfer_id: str
@@ -1,23 +1,23 @@
1
- from typing import Optional
2
-
3
- from pydantic import BaseModel
4
-
5
-
6
- class FundingRateEvent(BaseModel):
7
- # 使用毫秒时间戳,保持与现有事件风格一致
8
- event_time: int
9
- exchange_symbol: Optional[str] = None
10
- exchange: Optional[str] = None
11
- symbol: Optional[str] = None
12
- open_rate: Optional[float] = None
13
- close_rate: Optional[float] = None
14
- high_rate: Optional[float] = None
15
- low_rate: Optional[float] = None
16
- # 毫秒时间戳
17
- close_time: Optional[int] = None
18
- # 毫秒时间戳
19
- next_event_time: Optional[int] = None
20
-
21
- # 兼容表中其他字段
22
- id: Optional[str] = None
23
- ctimestamp: Optional[str] = None
1
+ from typing import Optional
2
+
3
+ from pydantic import BaseModel
4
+
5
+
6
+ class FundingRateEvent(BaseModel):
7
+ # 使用毫秒时间戳,保持与现有事件风格一致
8
+ event_time: int
9
+ exchange_symbol: Optional[str] = None
10
+ exchange: Optional[str] = None
11
+ symbol: Optional[str] = None
12
+ open_rate: Optional[float] = None
13
+ close_rate: Optional[float] = None
14
+ high_rate: Optional[float] = None
15
+ low_rate: Optional[float] = None
16
+ # 毫秒时间戳
17
+ close_time: Optional[int] = None
18
+ # 毫秒时间戳
19
+ next_event_time: Optional[int] = None
20
+
21
+ # 兼容表中其他字段
22
+ id: Optional[str] = None
23
+ ctimestamp: Optional[str] = None