bw-essentials-core 0.0.7__py3-none-any.whl → 0.0.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.
Potentially problematic release.
This version of bw-essentials-core might be problematic. Click here for more details.
- bw_essentials/services/master_data.py +23 -1
- {bw_essentials_core-0.0.7.dist-info → bw_essentials_core-0.0.8.dist-info}/METADATA +1 -1
- {bw_essentials_core-0.0.7.dist-info → bw_essentials_core-0.0.8.dist-info}/RECORD +5 -5
- {bw_essentials_core-0.0.7.dist-info → bw_essentials_core-0.0.8.dist-info}/WHEEL +1 -1
- {bw_essentials_core-0.0.7.dist-info → bw_essentials_core-0.0.8.dist-info}/top_level.txt +0 -0
|
@@ -45,7 +45,8 @@ class MasterData(ApiClient):
|
|
|
45
45
|
"broker_config": "broker/config/keys",
|
|
46
46
|
"broker_details": "securities/{}/details",
|
|
47
47
|
"isin_details": "company/details/isin",
|
|
48
|
-
"shorten_url": "shorten-url"
|
|
48
|
+
"shorten_url": "shorten-url",
|
|
49
|
+
"broker_partner_mapping_details": "partner/{}/broker/{}/"
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
def get_security_details(self, securities: List[str]) -> Optional[Dict[str, Any]]:
|
|
@@ -277,3 +278,24 @@ class MasterData(ApiClient):
|
|
|
277
278
|
data={"long_url": long_url})
|
|
278
279
|
logger.info(f"Shortening URL {response =}")
|
|
279
280
|
return response.get("data", {})
|
|
281
|
+
|
|
282
|
+
def get_or_create_broker_partner_mapping(self, broker_partner: str, broker: str) -> Dict[str, Any]:
|
|
283
|
+
"""
|
|
284
|
+
Fetches or creates a broker-partner mapping from master data constants table.
|
|
285
|
+
|
|
286
|
+
This method sends a GET request to retrieve the mapping details for a given
|
|
287
|
+
broker and broker partner. If the mapping does not exist, the API
|
|
288
|
+
is expected to create it automatically (based on implementation).
|
|
289
|
+
|
|
290
|
+
Parameters:
|
|
291
|
+
- broker_partner (str): The identifier of the broker partner.
|
|
292
|
+
- broker (str): The identifier of the broker.
|
|
293
|
+
|
|
294
|
+
Returns:
|
|
295
|
+
- Dict[str, Any]: The mapping data returned from the service, or an empty
|
|
296
|
+
dictionary if no data is available.
|
|
297
|
+
"""
|
|
298
|
+
logger.info(f"In - get_or_create_broker_partner_mapping | broker_partner={broker_partner} broker={broker}")
|
|
299
|
+
response = self._get(url=self.base_url, endpoint=self.urls["broker_partner_mapping_details"].format(broker_partner, broker))
|
|
300
|
+
logger.info(f"Broker partner mapping {response =}")
|
|
301
|
+
return response.get('data', {})
|
|
@@ -14,12 +14,12 @@ bw_essentials/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
|
|
|
14
14
|
bw_essentials/services/api_client.py,sha256=74tKxhY_HiVCN3kgtk27a4GNznMaRphAspt9CWecuiY,7793
|
|
15
15
|
bw_essentials/services/broker.py,sha256=As-VT1MxkCD9p-13dQJDwf0_aEJVA6H0wNqL-EYHO4g,8718
|
|
16
16
|
bw_essentials/services/market_pricer.py,sha256=WAFcG5JfnqWxjzXRPrMdovPuKqWJIwa3ENvGAyEyjeM,8712
|
|
17
|
-
bw_essentials/services/master_data.py,sha256=
|
|
17
|
+
bw_essentials/services/master_data.py,sha256=2o_r2gdhIKBeTFgn5IIY-becgCEpYBymO4BKmixdV1g,11987
|
|
18
18
|
bw_essentials/services/model_portfolio_reporting.py,sha256=iOtm4gyfU8P7C0R1gp6gUJI4ZRxJD5K2GLOalI_gToM,3249
|
|
19
19
|
bw_essentials/services/trade_placement.py,sha256=PrzeU2XXC9HF1IQ1dMDM_ZHxmC491sOl-JbA6GWPwII,20772
|
|
20
20
|
bw_essentials/services/user_portfolio.py,sha256=_5M6yPfQt4MXedINBawEoPkb_o7IGzxPeHkvZkoQm8k,16191
|
|
21
21
|
bw_essentials/services/user_portfolio_reporting.py,sha256=QaZzcw912Uos5ZafEaxLXDmCyetTFiVX3at3cTAv6MA,6003
|
|
22
|
-
bw_essentials_core-0.0.
|
|
23
|
-
bw_essentials_core-0.0.
|
|
24
|
-
bw_essentials_core-0.0.
|
|
25
|
-
bw_essentials_core-0.0.
|
|
22
|
+
bw_essentials_core-0.0.8.dist-info/METADATA,sha256=GHHKudJ8VIoZ0nOUAeAnpQy0FYXXuPMSTQYA_aa3Wt0,7501
|
|
23
|
+
bw_essentials_core-0.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
24
|
+
bw_essentials_core-0.0.8.dist-info/top_level.txt,sha256=gDc5T_y5snwKGXDQUusEus-FEt0RFwG644Yn_58wQOQ,14
|
|
25
|
+
bw_essentials_core-0.0.8.dist-info/RECORD,,
|
|
File without changes
|