openmarkets 0.1.0.dev120__tar.gz → 0.1.0.dev121__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.
Files changed (49) hide show
  1. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/PKG-INFO +1 -1
  2. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/pyproject.toml +1 -1
  3. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/config.py +1 -1
  4. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/markets.py +4 -4
  5. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/sector_industry.py +16 -17
  6. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/README.md +0 -0
  7. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/__init__.py +0 -0
  8. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/__main__.py +0 -0
  9. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/__init__.py +0 -0
  10. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/exceptions.py +0 -0
  11. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/fastmcp.py +0 -0
  12. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/serializers.py +0 -0
  13. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/server.py +0 -0
  14. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/toolset.py +0 -0
  15. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/core/types.py +0 -0
  16. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/py.typed +0 -0
  17. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/__init__.py +0 -0
  18. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/analysis.py +0 -0
  19. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/company.py +0 -0
  20. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/financials.py +0 -0
  21. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/funds.py +0 -0
  22. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/holdings.py +0 -0
  23. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/markets.py +0 -0
  24. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/options.py +0 -0
  25. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/sector_industry.py +0 -0
  26. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/stock.py +0 -0
  27. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/schemas/technical_analysis.py +0 -0
  28. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/analysis.py +0 -0
  29. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/financials.py +0 -0
  30. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/funds.py +0 -0
  31. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/holdings.py +0 -0
  32. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/options.py +0 -0
  33. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/stock.py +0 -0
  34. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/services/yfinance/technical_analysis.py +0 -0
  35. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/__init__.py +0 -0
  36. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/analyst_data.py +0 -0
  37. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/calendar.py +0 -0
  38. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/corporate_actions.py +0 -0
  39. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/crypto.py +0 -0
  40. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/extended_market.py +0 -0
  41. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/financial_statements.py +0 -0
  42. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/funds.py +0 -0
  43. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/historical_data.py +0 -0
  44. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/market_data.py +0 -0
  45. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/news.py +0 -0
  46. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/options.py +0 -0
  47. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/screener.py +0 -0
  48. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/stock_info.py +0 -0
  49. {openmarkets-0.1.0.dev120 → openmarkets-0.1.0.dev121}/src/openmarkets/tools/technical_analysis.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: openmarkets
3
- Version: 0.1.0.dev120
3
+ Version: 0.1.0.dev121
4
4
  Summary: OpenMarkets is a modular Model Context Protocol (MCP) server that unifies access to financial market data for AI, research, and quantitative finance. It offers robust APIs for historical prices, corporate actions, fundamentals, and more, enabling advanced agentic retrieval, RAG, and LLM-powered workflows.
5
5
  Keywords: machinelearning,finance,investment,mcp,modelcontextprotocol,yahoo finance,financial data retrieval
6
6
  Author: Dobri Danchev
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "openmarkets"
3
- version = "0.1.0.dev120"
3
+ version = "0.1.0.dev121"
4
4
  description = "OpenMarkets is a modular Model Context Protocol (MCP) server that unifies access to financial market data for AI, research, and quantitative finance. It offers robust APIs for historical prices, corporate actions, fundamentals, and more, enabling advanced agentic retrieval, RAG, and LLM-powered workflows."
5
5
  authors = [{ name = "Dobri Danchev" }]
6
6
  classifiers = [
@@ -44,7 +44,7 @@ class Settings(BaseSettings):
44
44
  description="Allowed origins for CORS (Cross-Origin Resource Sharing).",
45
45
  )
46
46
  toolset: str = Field(
47
- "openmarkets.services.yfinance",
47
+ "openmarkets.tools",
48
48
  description="The Python module path for the toolset to use.",
49
49
  )
50
50
 
@@ -3,12 +3,12 @@ import yfinance as yf
3
3
  from openmarkets.schemas.markets import MarketStatus, MarketSummary, MarketType, SummaryEntry
4
4
 
5
5
 
6
- def fetch_market_summary(market: MarketType) -> MarketSummary:
6
+ def fetch_market_summary(market: str) -> MarketSummary:
7
7
  """
8
8
  Fetch the market summary for a given market type.
9
9
 
10
10
  Args:
11
- market (MarketType): The market type.
11
+ market (str): The market type.
12
12
 
13
13
  Returns:
14
14
  MarketSummary: Market summary data.
@@ -17,12 +17,12 @@ def fetch_market_summary(market: MarketType) -> MarketSummary:
17
17
  return MarketSummary(summary={k: SummaryEntry(**v) for k, v in summary.items()})
18
18
 
19
19
 
20
- def fetch_market_status(market: MarketType) -> MarketStatus:
20
+ def fetch_market_status(market: str) -> MarketStatus:
21
21
  """
22
22
  Fetch the market status for a given market type.
23
23
 
24
24
  Args:
25
- market (MarketType): The market type.
25
+ market (str): The market type.
26
26
 
27
27
  Returns:
28
28
  MarketStatus: Market status data.
@@ -6,7 +6,6 @@ from openmarkets.schemas.sector_industry import (
6
6
  IndustryResearchReportEntry,
7
7
  IndustryTopCompaniesEntry,
8
8
  IndustryTopGrowthCompaniesEntry,
9
- SectorEnum,
10
9
  SectorOverview,
11
10
  SectorTopCompaniesEntry,
12
11
  SectorTopETFsEntry,
@@ -14,7 +13,7 @@ from openmarkets.schemas.sector_industry import (
14
13
  )
15
14
 
16
15
 
17
- def fetch_sector_overview(sector: SectorEnum) -> SectorOverview:
16
+ def fetch_sector_overview(sector: str) -> SectorOverview:
18
17
  """Fetches overview information for a given sector.
19
18
 
20
19
  Args:
@@ -27,7 +26,7 @@ def fetch_sector_overview(sector: SectorEnum) -> SectorOverview:
27
26
  ValueError: If the sector is not recognized.
28
27
  """
29
28
  print(f"Fetching overview for sector: {sector}")
30
- data = yf.Sector(sector.value).overview
29
+ data = yf.Sector(sector).overview
31
30
  return SectorOverview(**data)
32
31
 
33
32
 
@@ -47,10 +46,10 @@ def fetch_sector_overview_for_ticker(ticker: str) -> SectorOverview:
47
46
  sector = stock.info.get("sectorKey")
48
47
  if sector is None:
49
48
  raise ValueError(f"Sector not found for ticker: {ticker}")
50
- return fetch_sector_overview(SectorEnum[sector.upper()])
49
+ return fetch_sector_overview(sector.upper())
51
50
 
52
51
 
53
- def fetch_sector_top_companies(sector: SectorEnum) -> list[SectorTopCompaniesEntry]:
52
+ def fetch_sector_top_companies(sector: str) -> list[SectorTopCompaniesEntry]:
54
53
  """Fetches top companies for a given sector.
55
54
 
56
55
  Args:
@@ -59,7 +58,7 @@ def fetch_sector_top_companies(sector: SectorEnum) -> list[SectorTopCompaniesEnt
59
58
  Returns:
60
59
  List of SectorTopCompaniesEntry.
61
60
  """
62
- data = yf.Sector(sector.value).top_companies
61
+ data = yf.Sector(sector).top_companies
63
62
  if data is None:
64
63
  return []
65
64
  return [SectorTopCompaniesEntry(**row.to_dict()) for _, row in data.reset_index().iterrows()]
@@ -78,10 +77,10 @@ def fetch_sector_top_companies_for_ticker(ticker: str) -> list[SectorTopCompanie
78
77
  sector = stock.info.get("sectorKey")
79
78
  if sector is None:
80
79
  raise ValueError(f"Sector not found for ticker: {ticker}")
81
- return fetch_sector_top_companies(SectorEnum[sector.upper()])
80
+ return fetch_sector_top_companies(sector.upper())
82
81
 
83
82
 
84
- def fetch_sector_top_etfs(sector: SectorEnum) -> list[SectorTopETFsEntry]:
83
+ def fetch_sector_top_etfs(sector: str) -> list[SectorTopETFsEntry]:
85
84
  """Fetches top ETFs for a given sector.
86
85
 
87
86
  Args:
@@ -90,11 +89,11 @@ def fetch_sector_top_etfs(sector: SectorEnum) -> list[SectorTopETFsEntry]:
90
89
  Returns:
91
90
  List of SectorTopETFsEntry.
92
91
  """
93
- data = yf.Sector(sector.value).top_etfs
92
+ data = yf.Sector(sector).top_etfs
94
93
  return [SectorTopETFsEntry(symbol=k, name=v) for k, v in data.items()]
95
94
 
96
95
 
97
- def fetch_sector_top_mutual_funds(sector: SectorEnum) -> list[SectorTopMutualFundsEntry]:
96
+ def fetch_sector_top_mutual_funds(sector: str) -> list[SectorTopMutualFundsEntry]:
98
97
  """Fetches top mutual funds for a given sector.
99
98
 
100
99
  Args:
@@ -103,11 +102,11 @@ def fetch_sector_top_mutual_funds(sector: SectorEnum) -> list[SectorTopMutualFun
103
102
  Returns:
104
103
  List of SectorTopMutualFundsEntry.
105
104
  """
106
- data = yf.Sector(sector.value).top_mutual_funds
105
+ data = yf.Sector(sector).top_mutual_funds
107
106
  return [SectorTopMutualFundsEntry(symbol=k, name=v) for k, v in data.items()]
108
107
 
109
108
 
110
- def fetch_sector_industries(sector: SectorEnum) -> list[str]:
109
+ def fetch_sector_industries(sector: str) -> list[str]:
111
110
  """Returns the list of industries for a given sector.
112
111
 
113
112
  Args:
@@ -116,10 +115,10 @@ def fetch_sector_industries(sector: SectorEnum) -> list[str]:
116
115
  Returns:
117
116
  List of industry names.
118
117
  """
119
- return SECTOR_INDUSTRY_MAPPING.get(sector.value, [])
118
+ return SECTOR_INDUSTRY_MAPPING.get(sector, [])
120
119
 
121
120
 
122
- def fetch_sector_research_reports(sector: SectorEnum) -> list[IndustryResearchReportEntry]:
121
+ def fetch_sector_research_reports(sector: str) -> list[IndustryResearchReportEntry]:
123
122
  """Fetches research reports for a given sector.
124
123
 
125
124
  Args:
@@ -131,13 +130,13 @@ def fetch_sector_research_reports(sector: SectorEnum) -> list[IndustryResearchRe
131
130
  Raises:
132
131
  ValueError: If the sector is not recognized or no reports are found.
133
132
  """
134
- data = yf.Sector(sector.value).research_reports
133
+ data = yf.Sector(sector).research_reports
135
134
  if not data:
136
135
  return []
137
136
  return [IndustryResearchReportEntry(**entry) for entry in data]
138
137
 
139
138
 
140
- def fetch_all_industries(sector: SectorEnum | None = None) -> list[str]:
139
+ def fetch_all_industries(sector: str | None = None) -> list[str]:
141
140
  """Returns a list of industries.
142
141
 
143
142
  If sector is provided, returns industries for that sector only.
@@ -150,7 +149,7 @@ def fetch_all_industries(sector: SectorEnum | None = None) -> list[str]:
150
149
  List of industry names.
151
150
  """
152
151
  if sector is not None:
153
- return sorted(SECTOR_INDUSTRY_MAPPING.get(sector.value, []))
152
+ return sorted(SECTOR_INDUSTRY_MAPPING.get(sector, []))
154
153
  return sorted({industry for industries in SECTOR_INDUSTRY_MAPPING.values() for industry in industries})
155
154
 
156
155