DYAMS 0.10__py3-none-any.whl → 0.11__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.
- DYAMS/api/get_post_investment_product_asset_allocation.py +20 -2
- DYAMS/api/get_post_investment_product_holdings.py +10 -1
- {dyams-0.10.dist-info → dyams-0.11.dist-info}/METADATA +1 -1
- {dyams-0.10.dist-info → dyams-0.11.dist-info}/RECORD +7 -7
- {dyams-0.10.dist-info → dyams-0.11.dist-info}/WHEEL +0 -0
- {dyams-0.10.dist-info → dyams-0.11.dist-info}/licenses/LICENSE +0 -0
- {dyams-0.10.dist-info → dyams-0.11.dist-info}/top_level.txt +0 -0
|
@@ -28,15 +28,33 @@ def get_post_investment_product_asset_allocation(client,
|
|
|
28
28
|
elif not start_date or not end_date:
|
|
29
29
|
raise ValueError("start_date and end_date are required")
|
|
30
30
|
|
|
31
|
+
if isinstance(penetrate_type, PenetrateType):
|
|
32
|
+
penetrate_type_value = penetrate_type.name
|
|
33
|
+
elif isinstance(penetrate_type, str):
|
|
34
|
+
if penetrate_type not in PenetrateType._member_names_:
|
|
35
|
+
raise ValueError("不支持的穿透方式")
|
|
36
|
+
penetrate_type_value = penetrate_type
|
|
37
|
+
else:
|
|
38
|
+
penetrate_type_value = PenetrateType.NO_PENETRATE.name
|
|
39
|
+
|
|
40
|
+
if isinstance(weight_types, WeightType):
|
|
41
|
+
weight_types_value = weight_types.name
|
|
42
|
+
elif isinstance(weight_types, str):
|
|
43
|
+
if weight_types not in WeightType._member_names_:
|
|
44
|
+
raise ValueError("不支持的权重类型")
|
|
45
|
+
weight_types_value = weight_types
|
|
46
|
+
else:
|
|
47
|
+
weight_types_value = WeightType.TOTAL_FILTERED.name
|
|
48
|
+
|
|
31
49
|
url = f"{client.base_url}/lib/portfolio/v1/positionDistribution"
|
|
32
50
|
data = {
|
|
33
51
|
'accountCode': post_investment_product_id,
|
|
34
52
|
'startDate': start_date,
|
|
35
53
|
'endDate': end_date,
|
|
36
|
-
'penetrateWay':
|
|
54
|
+
'penetrateWay': penetrate_type_value,
|
|
37
55
|
'level': level,
|
|
38
56
|
'assetCategoryName': asset_class,
|
|
39
|
-
'ratioAssetType':
|
|
57
|
+
'ratioAssetType': weight_types_value,
|
|
40
58
|
'securityTypes': [security_type.name for security_type in asset_sceening]
|
|
41
59
|
}
|
|
42
60
|
headers = client.get_headers()
|
|
@@ -128,12 +128,21 @@ def get_post_investment_product_holdings(client,
|
|
|
128
128
|
elif not start_date or not end_date:
|
|
129
129
|
raise ValueError("start_date and end_date are required")
|
|
130
130
|
|
|
131
|
+
if isinstance(penetrate_type, PenetrateType):
|
|
132
|
+
penetrate_type_value = penetrate_type.name
|
|
133
|
+
elif isinstance(penetrate_type, str):
|
|
134
|
+
if penetrate_type not in PenetrateType._member_names_:
|
|
135
|
+
raise ValueError("不支持的穿透方式")
|
|
136
|
+
penetrate_type_value = penetrate_type
|
|
137
|
+
else:
|
|
138
|
+
penetrate_type_value = PenetrateType.NO_PENETRATE.name
|
|
139
|
+
|
|
131
140
|
url = f"{client.base_url}/lib/portfolio/v1/position"
|
|
132
141
|
data = {
|
|
133
142
|
'accountCode': post_investment_product_id,
|
|
134
143
|
'startDate': start_date,
|
|
135
144
|
'endDate': end_date,
|
|
136
|
-
'penetrateWay':
|
|
145
|
+
'penetrateWay': penetrate_type_value,
|
|
137
146
|
'level': level,
|
|
138
147
|
'assetCategoryName': asset_class
|
|
139
148
|
}
|
|
@@ -2,8 +2,8 @@ DYAMS/__init__.py,sha256=fXAonP2oCy8DRX9uuOtrLAQCxzPthNmxEzuaGX_Hzz0,1101
|
|
|
2
2
|
DYAMS/client.py,sha256=ftFBaLlq7d-61ZiCA1BbOKvR3-FpycSdnMz02fequNY,2144
|
|
3
3
|
DYAMS/enums.py,sha256=rW9y7n1G_eYvPyokSN5OrPAp4-raQWB-hTWH4NIFrC8,2490
|
|
4
4
|
DYAMS/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
-
DYAMS/api/get_post_investment_product_asset_allocation.py,sha256=
|
|
6
|
-
DYAMS/api/get_post_investment_product_holdings.py,sha256
|
|
5
|
+
DYAMS/api/get_post_investment_product_asset_allocation.py,sha256=CaUJFkhnuKqm6mEOCMksa4Eoj7y4cnFle8Xf613p-9s,2819
|
|
6
|
+
DYAMS/api/get_post_investment_product_holdings.py,sha256=j_b2i4M5UxyBXhMkOaMsN92ol7fumUXi7Xovyk__zjY,6518
|
|
7
7
|
DYAMS/api/get_post_investment_product_holdings_hierarchy.py,sha256=QL_iJ4LYOBN_wtHc-9TeqFOX9caBPlhBnOfVxwU6JCs,641
|
|
8
8
|
DYAMS/api/get_post_investment_product_list.py,sha256=lomv2qu04AFQivS2NvenYaLBYn53_P1hyxlBA2m0eJM,1515
|
|
9
9
|
DYAMS/api/get_post_investment_product_net.py,sha256=TWrnKKTp8AGS0Mwe-Wo2t64fXGcVhoFi7ujNjvqPhRo,1103
|
|
@@ -11,8 +11,8 @@ DYAMS/api/get_post_investment_product_performance_indicators.py,sha256=EDLz5xswV
|
|
|
11
11
|
DYAMS/api/get_private_asset_net.py,sha256=os5BzEwpXtQr4_GFJj9-oLmVc6WqxW1IIzJAOzXYrUI,1128
|
|
12
12
|
DYAMS/api/heartbeat.py,sha256=jDjiXRqee4QtGKR7nEoo4VhnlG_wvjT3aMXYizTNt1M,333
|
|
13
13
|
DYAMS/api/util.py,sha256=m8e139aQZs6IwsjstAnZdCuAqTdVheQ74NixtwLTgKg,301
|
|
14
|
-
dyams-0.
|
|
15
|
-
dyams-0.
|
|
16
|
-
dyams-0.
|
|
17
|
-
dyams-0.
|
|
18
|
-
dyams-0.
|
|
14
|
+
dyams-0.11.dist-info/licenses/LICENSE,sha256=WOCX9n2629PC9kRp-MvyMGR4DrNHG7_Q1Woo6QotwZ4,1130
|
|
15
|
+
dyams-0.11.dist-info/METADATA,sha256=_LsPrkS6sRkSC0caDdlT6_AaxURpjNT50iZp3MZUl58,438
|
|
16
|
+
dyams-0.11.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
17
|
+
dyams-0.11.dist-info/top_level.txt,sha256=7vYrzyi90ywuwd-c24CKytuWbuILmzcU7kQYCuBu7No,6
|
|
18
|
+
dyams-0.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|