DYAMS 0.8__py3-none-any.whl → 0.10__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/__init__.py CHANGED
@@ -11,6 +11,10 @@ def get_post_investment_product_holdings(*args, **kwargs):
11
11
  return Client.get_instance().get_post_investment_product_holdings(*args, **kwargs)
12
12
 
13
13
 
14
+ def get_post_investment_product_holdings_hierarchy(*args, **kwargs):
15
+ return Client.get_instance().get_post_investment_product_holdings_hierarchy(*args, **kwargs)
16
+
17
+
14
18
  def get_post_investment_product_performance_indicators(*args, **kwargs):
15
19
  return Client.get_instance().get_post_investment_product_performance_indicators(*args, **kwargs)
16
20
 
@@ -109,18 +109,6 @@ field_mapping = {
109
109
  'fxRate': 'valuation_exchange_rate',
110
110
  'positionTime': 'market_quotation_time',
111
111
  'holdDate': 'position_building_date',
112
- 'partyFullName': 'issuing_entity',
113
- 'yearToMaturity': 'remaining_maturity',
114
- 'nominalRatingInst': 'bond_rating_agency',
115
- 'nominalRating': 'bond_rating',
116
- 'margin': 'margin_requirement',
117
- 'city': 'city',
118
- 'province': 'province',
119
- 'instRatingYY': 'issuer_rating_(YY)',
120
- 'instRatingDate': 'issuer_rating_date',
121
- 'instRating': 'issuer_rating',
122
- 'nominalRatingDate': 'bond_rating_date',
123
- 'instRatingInst': 'issuer_rating_agency'
124
112
  }
125
113
 
126
114
 
@@ -0,0 +1,21 @@
1
+ import requests
2
+ from .util import get_response_json_with_check
3
+
4
+
5
+ def get_post_investment_product_holdings_hierarchy(client,
6
+ post_investment_product_id,
7
+ date):
8
+
9
+ url = f"{client.base_url}/lib/portfolio/v1/positionHierarchy"
10
+ data = {
11
+ 'accountCode': post_investment_product_id,
12
+ 'date': date
13
+ }
14
+ headers = client.get_headers()
15
+ try:
16
+ response = requests.post(url, headers=headers, json=data)
17
+ r = get_response_json_with_check(response)
18
+
19
+ return r
20
+ except Exception as e:
21
+ raise e
DYAMS/api/util.py CHANGED
@@ -6,5 +6,5 @@ def get_response_json_with_check(response):
6
6
  if r.get('code') == -403:
7
7
  raise Exception("token认证失败")
8
8
  if r.get('code') != 'S00000':
9
- raise Exception(r.get('message'))
9
+ raise Exception(r.get('msg'))
10
10
  return r
DYAMS/client.py CHANGED
@@ -1,6 +1,7 @@
1
1
  from .api.heartbeat import heartbeat
2
2
  from .api.get_post_investment_product_list import get_post_investment_product_list
3
3
  from .api.get_post_investment_product_holdings import get_post_investment_product_holdings
4
+ from .api.get_post_investment_product_holdings_hierarchy import get_post_investment_product_holdings_hierarchy
4
5
  from .api.get_post_investment_product_performance_indicators import get_post_investment_product_performance_indicators
5
6
  from .api.get_post_investment_product_net import get_post_investment_product_net
6
7
  from .api.get_post_investment_product_asset_allocation import get_post_investment_product_asset_allocation
@@ -39,6 +40,7 @@ class Client:
39
40
 
40
41
  Client.get_post_investment_product_list = get_post_investment_product_list
41
42
  Client.get_post_investment_product_holdings = get_post_investment_product_holdings
43
+ Client.get_post_investment_product_holdings_hierarchy = get_post_investment_product_holdings_hierarchy
42
44
  Client.get_post_investment_product_performance_indicators = get_post_investment_product_performance_indicators
43
45
  Client.get_post_investment_product_net = get_post_investment_product_net
44
46
  Client.get_post_investment_product_asset_allocation = get_post_investment_product_asset_allocation
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: DYAMS
3
- Version: 0.8
3
+ Version: 0.10
4
4
  Summary: 通联数据AMS系统数据SDK
5
5
  Author-email: songjiangduo <jiangduo.song@datayes.com>
6
6
  License-Expression: MIT
@@ -0,0 +1,18 @@
1
+ DYAMS/__init__.py,sha256=fXAonP2oCy8DRX9uuOtrLAQCxzPthNmxEzuaGX_Hzz0,1101
2
+ DYAMS/client.py,sha256=ftFBaLlq7d-61ZiCA1BbOKvR3-FpycSdnMz02fequNY,2144
3
+ DYAMS/enums.py,sha256=rW9y7n1G_eYvPyokSN5OrPAp4-raQWB-hTWH4NIFrC8,2490
4
+ DYAMS/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
+ DYAMS/api/get_post_investment_product_asset_allocation.py,sha256=LbUDdQdcoE0zBS6c7rhFZqdC_qEJhg23PQsacBrmLLA,2171
6
+ DYAMS/api/get_post_investment_product_holdings.py,sha256=-oq4DW_pTv3g9QI_-oAs3qdJYysx4kXRCJfsF6daIC0,6184
7
+ DYAMS/api/get_post_investment_product_holdings_hierarchy.py,sha256=QL_iJ4LYOBN_wtHc-9TeqFOX9caBPlhBnOfVxwU6JCs,641
8
+ DYAMS/api/get_post_investment_product_list.py,sha256=lomv2qu04AFQivS2NvenYaLBYn53_P1hyxlBA2m0eJM,1515
9
+ DYAMS/api/get_post_investment_product_net.py,sha256=TWrnKKTp8AGS0Mwe-Wo2t64fXGcVhoFi7ujNjvqPhRo,1103
10
+ DYAMS/api/get_post_investment_product_performance_indicators.py,sha256=EDLz5xswVoBuDETEOXYeUxYu19USZH21rFpMUXaUs6s,1486
11
+ DYAMS/api/get_private_asset_net.py,sha256=os5BzEwpXtQr4_GFJj9-oLmVc6WqxW1IIzJAOzXYrUI,1128
12
+ DYAMS/api/heartbeat.py,sha256=jDjiXRqee4QtGKR7nEoo4VhnlG_wvjT3aMXYizTNt1M,333
13
+ DYAMS/api/util.py,sha256=m8e139aQZs6IwsjstAnZdCuAqTdVheQ74NixtwLTgKg,301
14
+ dyams-0.10.dist-info/licenses/LICENSE,sha256=WOCX9n2629PC9kRp-MvyMGR4DrNHG7_Q1Woo6QotwZ4,1130
15
+ dyams-0.10.dist-info/METADATA,sha256=0RBkWOdZLDn68Wg6N5WO13ujpK50cqdvCv9_pc_IE-Q,438
16
+ dyams-0.10.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
17
+ dyams-0.10.dist-info/top_level.txt,sha256=7vYrzyi90ywuwd-c24CKytuWbuILmzcU7kQYCuBu7No,6
18
+ dyams-0.10.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,17 +0,0 @@
1
- DYAMS/__init__.py,sha256=vS1EplSNSpQk9ecUZbKlnkgTurMmZj2exA9OOActxY4,933
2
- DYAMS/client.py,sha256=x-s7htAgveg8uiI8T8bRGk9xh_56admnjN61AZHUCnA,1930
3
- DYAMS/enums.py,sha256=rW9y7n1G_eYvPyokSN5OrPAp4-raQWB-hTWH4NIFrC8,2490
4
- DYAMS/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
- DYAMS/api/get_post_investment_product_asset_allocation.py,sha256=LbUDdQdcoE0zBS6c7rhFZqdC_qEJhg23PQsacBrmLLA,2171
6
- DYAMS/api/get_post_investment_product_holdings.py,sha256=RWt8ci7ypHs_zyz0LwO8O__sVH63ADUWRaJYcPCJNpg,6645
7
- DYAMS/api/get_post_investment_product_list.py,sha256=lomv2qu04AFQivS2NvenYaLBYn53_P1hyxlBA2m0eJM,1515
8
- DYAMS/api/get_post_investment_product_net.py,sha256=TWrnKKTp8AGS0Mwe-Wo2t64fXGcVhoFi7ujNjvqPhRo,1103
9
- DYAMS/api/get_post_investment_product_performance_indicators.py,sha256=EDLz5xswVoBuDETEOXYeUxYu19USZH21rFpMUXaUs6s,1486
10
- DYAMS/api/get_private_asset_net.py,sha256=os5BzEwpXtQr4_GFJj9-oLmVc6WqxW1IIzJAOzXYrUI,1128
11
- DYAMS/api/heartbeat.py,sha256=jDjiXRqee4QtGKR7nEoo4VhnlG_wvjT3aMXYizTNt1M,333
12
- DYAMS/api/util.py,sha256=VVoNbaPTyySwyrGJ60pdUPja2gWUyNBJBxY4l_xRSr8,305
13
- dyams-0.8.dist-info/licenses/LICENSE,sha256=WOCX9n2629PC9kRp-MvyMGR4DrNHG7_Q1Woo6QotwZ4,1130
14
- dyams-0.8.dist-info/METADATA,sha256=tVutXd6FREZ2ZFQ8gAU7XJW88PLu47A6P-xnmk7Goxo,437
15
- dyams-0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
16
- dyams-0.8.dist-info/top_level.txt,sha256=7vYrzyi90ywuwd-c24CKytuWbuILmzcU7kQYCuBu7No,6
17
- dyams-0.8.dist-info/RECORD,,