cnhkmcp 1.1.7__py3-none-any.whl → 1.1.9__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.
- cnhkmcp/__init__.py +1 -1
- cnhkmcp/untracked/platform_functions.py +11 -16
- {cnhkmcp-1.1.7.dist-info → cnhkmcp-1.1.9.dist-info}/METADATA +1 -1
- cnhkmcp-1.1.9.dist-info/RECORD +10 -0
- cnhkmcp-1.1.7.dist-info/RECORD +0 -10
- {cnhkmcp-1.1.7.dist-info → cnhkmcp-1.1.9.dist-info}/WHEEL +0 -0
- {cnhkmcp-1.1.7.dist-info → cnhkmcp-1.1.9.dist-info}/entry_points.txt +0 -0
- {cnhkmcp-1.1.7.dist-info → cnhkmcp-1.1.9.dist-info}/licenses/LICENSE +0 -0
- {cnhkmcp-1.1.7.dist-info → cnhkmcp-1.1.9.dist-info}/top_level.txt +0 -0
cnhkmcp/__init__.py
CHANGED
|
@@ -429,13 +429,12 @@ class BrainApiClient:
|
|
|
429
429
|
self.log(f"Failed to get datafields: {str(e)}", "ERROR")
|
|
430
430
|
raise
|
|
431
431
|
|
|
432
|
-
async def get_alpha_pnl(self, alpha_id: str
|
|
432
|
+
async def get_alpha_pnl(self, alpha_id: str) -> Dict[str, Any]:
|
|
433
433
|
"""Get PnL data for an alpha."""
|
|
434
434
|
await self.ensure_authenticated()
|
|
435
435
|
|
|
436
436
|
try:
|
|
437
|
-
|
|
438
|
-
response = self.session.get(f"{self.base_url}/alphas/{alpha_id}/recordsets/{pnl_type}", params=params)
|
|
437
|
+
response = self.session.get(f"{self.base_url}/alphas/{alpha_id}/recordsets/pnl")
|
|
439
438
|
response.raise_for_status()
|
|
440
439
|
return response.json()
|
|
441
440
|
except Exception as e:
|
|
@@ -927,8 +926,7 @@ class BrainApiClient:
|
|
|
927
926
|
self.log(f"Failed to get user activities: {str(e)}", "ERROR")
|
|
928
927
|
raise
|
|
929
928
|
|
|
930
|
-
async def get_pyramid_multipliers(self
|
|
931
|
-
category: Optional[str] = None) -> Dict[str, Any]:
|
|
929
|
+
async def get_pyramid_multipliers(self) -> Dict[str, Any]:
|
|
932
930
|
"""Get current pyramid multipliers showing BRAIN's encouragement levels."""
|
|
933
931
|
await self.ensure_authenticated()
|
|
934
932
|
|
|
@@ -1459,19 +1457,18 @@ async def get_datafields(
|
|
|
1459
1457
|
return {"error": str(e)}
|
|
1460
1458
|
|
|
1461
1459
|
@mcp.tool()
|
|
1462
|
-
async def get_alpha_pnl(alpha_id: str
|
|
1460
|
+
async def get_alpha_pnl(alpha_id: str) -> Dict[str, Any]:
|
|
1463
1461
|
"""
|
|
1464
1462
|
📈 Get PnL (Profit and Loss) data for an alpha.
|
|
1465
1463
|
|
|
1466
1464
|
Args:
|
|
1467
1465
|
alpha_id: The ID of the alpha
|
|
1468
|
-
pnl_type: Type of PnL data ("pnl" for cumulative, "daily-pnl" for daily)
|
|
1469
1466
|
|
|
1470
1467
|
Returns:
|
|
1471
1468
|
PnL data for the alpha
|
|
1472
1469
|
"""
|
|
1473
1470
|
try:
|
|
1474
|
-
return await brain_client.get_alpha_pnl(alpha_id
|
|
1471
|
+
return await brain_client.get_alpha_pnl(alpha_id)
|
|
1475
1472
|
except Exception as e:
|
|
1476
1473
|
return {"error": str(e)}
|
|
1477
1474
|
|
|
@@ -1483,8 +1480,8 @@ async def get_user_alphas(stage: str = "IS", limit: int = 100, offset: int = 0)
|
|
|
1483
1480
|
Args:
|
|
1484
1481
|
stage: Alpha stage ("IS" for in-sample, "OS" for out-of-sample)
|
|
1485
1482
|
limit: Maximum number of alphas to return
|
|
1486
|
-
offset: Offset for pagination
|
|
1487
|
-
|
|
1483
|
+
offset: Offset for pagination, if the desired total number is larger than 100. then it is useful, every page, the load max is 100 alphas.
|
|
1484
|
+
|
|
1488
1485
|
Returns:
|
|
1489
1486
|
User's alphas
|
|
1490
1487
|
"""
|
|
@@ -1852,21 +1849,19 @@ async def get_user_activities(user_id: str, grouping: Optional[str] = None) -> D
|
|
|
1852
1849
|
return {"error": str(e)}
|
|
1853
1850
|
|
|
1854
1851
|
@mcp.tool()
|
|
1855
|
-
async def get_pyramid_multipliers(
|
|
1856
|
-
category: Optional[str] = None) -> Dict[str, Any]:
|
|
1852
|
+
async def get_pyramid_multipliers() -> Dict[str, Any]:
|
|
1857
1853
|
"""Get current pyramid multipliers showing BRAIN's encouragement levels."""
|
|
1858
1854
|
try:
|
|
1859
|
-
return await brain_client.get_pyramid_multipliers(
|
|
1855
|
+
return await brain_client.get_pyramid_multipliers()
|
|
1860
1856
|
except Exception as e:
|
|
1861
1857
|
return {"error": str(e)}
|
|
1862
1858
|
|
|
1863
1859
|
@mcp.tool()
|
|
1864
|
-
async def get_pyramid_alphas(
|
|
1865
|
-
category: Optional[str] = None, start_date: Optional[str] = None,
|
|
1860
|
+
async def get_pyramid_alphas(start_date: Optional[str] = None,
|
|
1866
1861
|
end_date: Optional[str] = None) -> Dict[str, Any]:
|
|
1867
1862
|
"""Get user's current alpha distribution across pyramid categories."""
|
|
1868
1863
|
try:
|
|
1869
|
-
return await brain_client.get_pyramid_alphas(
|
|
1864
|
+
return await brain_client.get_pyramid_alphas(start_date, end_date)
|
|
1870
1865
|
except Exception as e:
|
|
1871
1866
|
return {"error": str(e)}
|
|
1872
1867
|
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
cnhkmcp/__init__.py,sha256=Tlw4ri2cMOXCs3vzMgySpzGcbL3fmRIqJL16V7cFxmM,2758
|
|
2
|
+
cnhkmcp/untracked/forum_functions.py,sha256=78wzvN_UYWwbWU40q8_FJNSFPJnND6W9ZRey6MSSiEk,45516
|
|
3
|
+
cnhkmcp/untracked/platform_functions.py,sha256=loa1NozEqaze77rESYNup_LXz3q2_cx-6G6HBJDXaII,76931
|
|
4
|
+
cnhkmcp/untracked/user_config.json,sha256=_INn1X1qIsITrmEno-BRlQOAGm9wnNCw-6B333DEvnk,695
|
|
5
|
+
cnhkmcp-1.1.9.dist-info/licenses/LICENSE,sha256=QLxO2eNMnJQEdI_R1UV2AOD-IvuA8zVrkHWA4D9gtoc,1081
|
|
6
|
+
cnhkmcp-1.1.9.dist-info/METADATA,sha256=ZbRfevIPe3y6fY53M2yyugUDUoPIQMuE9BMorMveHyo,5171
|
|
7
|
+
cnhkmcp-1.1.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
cnhkmcp-1.1.9.dist-info/entry_points.txt,sha256=lTQieVyIvjhSMK4fT-XwnccY-JBC1H4vVQ3V9dDM-Pc,70
|
|
9
|
+
cnhkmcp-1.1.9.dist-info/top_level.txt,sha256=x--ibUcSgOS9Z_RWK2Qc-vfs7DaXQN-WMaaxEETJ1Bw,8
|
|
10
|
+
cnhkmcp-1.1.9.dist-info/RECORD,,
|
cnhkmcp-1.1.7.dist-info/RECORD
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
cnhkmcp/__init__.py,sha256=zA4Je1BkR8_9NorDUU5n_QEozwqBquxVGsUrGk3yHjc,2758
|
|
2
|
-
cnhkmcp/untracked/forum_functions.py,sha256=78wzvN_UYWwbWU40q8_FJNSFPJnND6W9ZRey6MSSiEk,45516
|
|
3
|
-
cnhkmcp/untracked/platform_functions.py,sha256=sDW-tOhWUT41YuO-A3ugimkrNEj0ShMEUYp4EFVQpeA,77441
|
|
4
|
-
cnhkmcp/untracked/user_config.json,sha256=_INn1X1qIsITrmEno-BRlQOAGm9wnNCw-6B333DEvnk,695
|
|
5
|
-
cnhkmcp-1.1.7.dist-info/licenses/LICENSE,sha256=QLxO2eNMnJQEdI_R1UV2AOD-IvuA8zVrkHWA4D9gtoc,1081
|
|
6
|
-
cnhkmcp-1.1.7.dist-info/METADATA,sha256=sNnIQ4NvGvk6qScb5HBmfhUiP9-OiDG1hsGQLn-RazA,5171
|
|
7
|
-
cnhkmcp-1.1.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
cnhkmcp-1.1.7.dist-info/entry_points.txt,sha256=lTQieVyIvjhSMK4fT-XwnccY-JBC1H4vVQ3V9dDM-Pc,70
|
|
9
|
-
cnhkmcp-1.1.7.dist-info/top_level.txt,sha256=x--ibUcSgOS9Z_RWK2Qc-vfs7DaXQN-WMaaxEETJ1Bw,8
|
|
10
|
-
cnhkmcp-1.1.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|