cnhkmcp 1.1.7__tar.gz → 1.1.8__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cnhkmcp
3
- Version: 1.1.7
3
+ Version: 1.1.8
4
4
  Summary: A comprehensive Model Context Protocol (MCP) server for quantitative trading platform integration
5
5
  Home-page: https://github.com/cnhk/cnhkmcp
6
6
  Author: CNHK
@@ -50,7 +50,7 @@ from .untracked.forum_functions import (
50
50
  read_full_forum_post
51
51
  )
52
52
 
53
- __version__ = "1.1.7"
53
+ __version__ = "1.1.8"
54
54
  __author__ = "CNHK"
55
55
  __email__ = "cnhk@example.com"
56
56
 
@@ -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, pnl_type: str = "pnl") -> Dict[str, Any]:
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
- params = {'type': pnl_type}
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, region: Optional[str] = None, delay: Optional[int] = None,
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, pnl_type: str = "pnl") -> Dict[str, Any]:
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, pnl_type)
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,11 +1849,10 @@ 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(region: Optional[str] = None, delay: Optional[int] = None,
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(region, delay, category)
1855
+ return await brain_client.get_pyramid_multipliers()
1860
1856
  except Exception as e:
1861
1857
  return {"error": str(e)}
1862
1858
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cnhkmcp
3
- Version: 1.1.7
3
+ Version: 1.1.8
4
4
  Summary: A comprehensive Model Context Protocol (MCP) server for quantitative trading platform integration
5
5
  Home-page: https://github.com/cnhk/cnhkmcp
6
6
  Author: CNHK
@@ -13,7 +13,7 @@ def read_requirements():
13
13
 
14
14
  setup(
15
15
  name="cnhkmcp",
16
- version="1.1.7",
16
+ version="1.1.8",
17
17
  author="CNHK",
18
18
  author_email="cnhk@example.com",
19
19
  description="A comprehensive Model Context Protocol (MCP) server for quantitative trading platform integration",
File without changes
File without changes
File without changes
File without changes
File without changes