akshare-one 0.3.1__tar.gz → 0.3.3__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 (57) hide show
  1. {akshare_one-0.3.1 → akshare_one-0.3.3}/LICENSE +21 -21
  2. {akshare_one-0.3.1 → akshare_one-0.3.3}/PKG-INFO +70 -70
  3. {akshare_one-0.3.1 → akshare_one-0.3.3}/README.md +53 -53
  4. akshare_one-0.3.3/akshare_one/__init__.py +214 -0
  5. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/indicators.py +395 -395
  6. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/cache.py +10 -9
  7. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/eastmoney/client.py +88 -88
  8. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/eastmoney/utils.py +104 -104
  9. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/financial/base.py +27 -22
  10. akshare_one-0.3.3/akshare_one/modules/financial/eastmoney.py +184 -0
  11. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/financial/factory.py +46 -44
  12. akshare_one-0.3.3/akshare_one/modules/financial/sina.py +298 -0
  13. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/historical/base.py +47 -47
  14. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/historical/eastmoney.py +241 -241
  15. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/historical/eastmoney_direct.py +79 -79
  16. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/historical/factory.py +48 -48
  17. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/historical/sina.py +254 -254
  18. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/indicators/base.py +158 -158
  19. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/indicators/factory.py +33 -33
  20. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/indicators/simple.py +230 -230
  21. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/indicators/talib.py +263 -263
  22. akshare_one-0.3.3/akshare_one/modules/info/base.py +25 -0
  23. akshare_one-0.3.3/akshare_one/modules/info/eastmoney.py +52 -0
  24. akshare_one-0.3.3/akshare_one/modules/info/factory.py +44 -0
  25. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/insider/base.py +28 -28
  26. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/insider/factory.py +44 -44
  27. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/insider/xueqiu.py +115 -115
  28. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/news/base.py +22 -22
  29. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/news/eastmoney.py +47 -47
  30. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/news/factory.py +44 -44
  31. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/realtime/base.py +27 -27
  32. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/realtime/eastmoney.py +57 -57
  33. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/realtime/eastmoney_direct.py +37 -37
  34. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/realtime/factory.py +48 -48
  35. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/realtime/xueqiu.py +60 -60
  36. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/utils.py +10 -10
  37. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one.egg-info/PKG-INFO +70 -70
  38. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one.egg-info/SOURCES.txt +5 -4
  39. akshare_one-0.3.3/akshare_one.egg-info/requires.txt +5 -0
  40. {akshare_one-0.3.1 → akshare_one-0.3.3}/pyproject.toml +35 -35
  41. {akshare_one-0.3.1 → akshare_one-0.3.3}/setup.cfg +4 -4
  42. {akshare_one-0.3.1 → akshare_one-0.3.3}/tests/test_financial.py +107 -73
  43. {akshare_one-0.3.1 → akshare_one-0.3.3}/tests/test_indicators.py +331 -331
  44. akshare_one-0.3.3/tests/test_info.py +33 -0
  45. {akshare_one-0.3.1 → akshare_one-0.3.3}/tests/test_insider.py +66 -66
  46. {akshare_one-0.3.1 → akshare_one-0.3.3}/tests/test_news.py +69 -74
  47. {akshare_one-0.3.1 → akshare_one-0.3.3}/tests/test_stock.py +200 -200
  48. akshare_one-0.3.1/akshare_one/__init__.py +0 -31
  49. akshare_one-0.3.1/akshare_one/financial.py +0 -46
  50. akshare_one-0.3.1/akshare_one/insider.py +0 -33
  51. akshare_one-0.3.1/akshare_one/modules/financial/sina.py +0 -273
  52. akshare_one-0.3.1/akshare_one/news.py +0 -27
  53. akshare_one-0.3.1/akshare_one/stock.py +0 -78
  54. akshare_one-0.3.1/akshare_one.egg-info/requires.txt +0 -5
  55. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one/modules/indicators/__init__.py +0 -0
  56. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one.egg-info/dependency_links.txt +0 -0
  57. {akshare_one-0.3.1 → akshare_one-0.3.3}/akshare_one.egg-info/top_level.txt +0 -0
@@ -1,21 +1,21 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 zwldarren
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ MIT License
2
+
3
+ Copyright (c) 2025 zwldarren
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,70 +1,70 @@
1
- Metadata-Version: 2.4
2
- Name: akshare-one
3
- Version: 0.3.1
4
- Summary: Standardized interface for Chinese financial market data, built on AKShare with unified data formats and simplified APIs
5
- License-Expression: MIT
6
- Project-URL: Homepage, https://github.com/zwldarren/akshare-one
7
- Project-URL: Repository, https://github.com/zwldarren/akshare-one.git
8
- Keywords: akshare,financial-data,stock-data,quant
9
- Requires-Python: >=3.12
10
- Description-Content-Type: text/markdown
11
- License-File: LICENSE
12
- Requires-Dist: akshare>=1.17.15
13
- Requires-Dist: cachetools>=6.1.0
14
- Provides-Extra: talib
15
- Requires-Dist: ta-lib>=0.6.4; extra == "talib"
16
- Dynamic: license-file
17
-
18
- <div align="center">
19
- <h1>AKShare One</h1>
20
- <div>
21
- <a href="README_zh.md">中文</a> | <strong>English</strong>
22
- </div>
23
- </div>
24
-
25
- **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
26
-
27
- ## ✨ Features
28
-
29
- - 📊 Unified stock code formats across data sources
30
- - 🏗️ Standardized return data structures
31
- - 🛠️ Simplified API parameter design
32
- - ⏱️ Automatic timestamp and adjustment handling
33
-
34
- ## 🚀 Core Features
35
-
36
- | Function | Interface |
37
- |------|------|
38
- | Historical data | `get_hist_data` |
39
- | Real-time quotes | `get_realtime_data` |
40
- | Stock news | `get_news_data` |
41
- | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
42
- | Internal transactions | `get_inner_trade_data` |
43
- | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
44
-
45
- ## 📦 Quick Installation
46
-
47
- ```bash
48
- pip install akshare-one
49
- ```
50
-
51
- ## 💻 Usage Example
52
-
53
- ```python
54
- from akshare_one import get_hist_data
55
- from akshare_one.indicators import get_sma
56
-
57
- # Get historical data
58
- df = get_hist_data(
59
- symbol="600000",
60
- interval="day",
61
- adjust="hfq"
62
- )
63
-
64
- # Calculate 20-day Simple Moving Average
65
- df_sma = get_sma(df, window=20)
66
- ```
67
-
68
- ## 📚 Documentation
69
-
70
- Detailed API reference: [docs/api.md](docs/api.md)
1
+ Metadata-Version: 2.4
2
+ Name: akshare-one
3
+ Version: 0.3.3
4
+ Summary: Standardized interface for Chinese financial market data, built on AKShare with unified data formats and simplified APIs
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/zwldarren/akshare-one
7
+ Project-URL: Repository, https://github.com/zwldarren/akshare-one.git
8
+ Keywords: akshare,financial-data,stock-data,quant
9
+ Requires-Python: >=3.10
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: akshare>=1.17.20
13
+ Requires-Dist: cachetools>=5.5.2
14
+ Provides-Extra: talib
15
+ Requires-Dist: ta-lib>=0.6.4; extra == "talib"
16
+ Dynamic: license-file
17
+
18
+ <div align="center">
19
+ <h1>AKShare One</h1>
20
+ <div>
21
+ <a href="README_zh.md">中文</a> | <strong>English</strong>
22
+ </div>
23
+ </div>
24
+
25
+ **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
26
+
27
+ ## ✨ Features
28
+
29
+ - 📊 Unified stock code formats across data sources
30
+ - 🏗️ Standardized return data structures
31
+ - 🛠️ Simplified API parameter design
32
+ - ⏱️ Automatic timestamp and adjustment handling
33
+
34
+ ## 🚀 Core Features
35
+
36
+ | Function | Interface |
37
+ |------|------|
38
+ | Historical data | `get_hist_data` |
39
+ | Real-time quotes | `get_realtime_data` |
40
+ | Stock news | `get_news_data` |
41
+ | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
42
+ | Internal transactions | `get_inner_trade_data` |
43
+ | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
44
+
45
+ ## 📦 Quick Installation
46
+
47
+ ```bash
48
+ pip install akshare-one
49
+ ```
50
+
51
+ ## 💻 Usage Example
52
+
53
+ ```python
54
+ from akshare_one import get_hist_data
55
+ from akshare_one.indicators import get_sma
56
+
57
+ # Get historical data
58
+ df = get_hist_data(
59
+ symbol="600000",
60
+ interval="day",
61
+ adjust="hfq"
62
+ )
63
+
64
+ # Calculate 20-day Simple Moving Average
65
+ df_sma = get_sma(df, window=20)
66
+ ```
67
+
68
+ ## 📚 Documentation
69
+
70
+ Detailed API reference: [docs/api.md](docs/api.md)
@@ -1,53 +1,53 @@
1
- <div align="center">
2
- <h1>AKShare One</h1>
3
- <div>
4
- <a href="README_zh.md">中文</a> | <strong>English</strong>
5
- </div>
6
- </div>
7
-
8
- **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
9
-
10
- ## ✨ Features
11
-
12
- - 📊 Unified stock code formats across data sources
13
- - 🏗️ Standardized return data structures
14
- - 🛠️ Simplified API parameter design
15
- - ⏱️ Automatic timestamp and adjustment handling
16
-
17
- ## 🚀 Core Features
18
-
19
- | Function | Interface |
20
- |------|------|
21
- | Historical data | `get_hist_data` |
22
- | Real-time quotes | `get_realtime_data` |
23
- | Stock news | `get_news_data` |
24
- | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
25
- | Internal transactions | `get_inner_trade_data` |
26
- | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
27
-
28
- ## 📦 Quick Installation
29
-
30
- ```bash
31
- pip install akshare-one
32
- ```
33
-
34
- ## 💻 Usage Example
35
-
36
- ```python
37
- from akshare_one import get_hist_data
38
- from akshare_one.indicators import get_sma
39
-
40
- # Get historical data
41
- df = get_hist_data(
42
- symbol="600000",
43
- interval="day",
44
- adjust="hfq"
45
- )
46
-
47
- # Calculate 20-day Simple Moving Average
48
- df_sma = get_sma(df, window=20)
49
- ```
50
-
51
- ## 📚 Documentation
52
-
53
- Detailed API reference: [docs/api.md](docs/api.md)
1
+ <div align="center">
2
+ <h1>AKShare One</h1>
3
+ <div>
4
+ <a href="README_zh.md">中文</a> | <strong>English</strong>
5
+ </div>
6
+ </div>
7
+
8
+ **AKShare One** is a data interface for obtaining Chinese A-shares, based on [AKShare](https://github.com/akfamily/akshare). It aims to simplify AKShare's usage and unify input/output formats from different data sources, making it easier to pass data to LLM.
9
+
10
+ ## ✨ Features
11
+
12
+ - 📊 Unified stock code formats across data sources
13
+ - 🏗️ Standardized return data structures
14
+ - 🛠️ Simplified API parameter design
15
+ - ⏱️ Automatic timestamp and adjustment handling
16
+
17
+ ## 🚀 Core Features
18
+
19
+ | Function | Interface |
20
+ |------|------|
21
+ | Historical data | `get_hist_data` |
22
+ | Real-time quotes | `get_realtime_data` |
23
+ | Stock news | `get_news_data` |
24
+ | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
25
+ | Internal transactions | `get_inner_trade_data` |
26
+ | Technical indicators | See [indicators.py](akshare_one/indicators.py) |
27
+
28
+ ## 📦 Quick Installation
29
+
30
+ ```bash
31
+ pip install akshare-one
32
+ ```
33
+
34
+ ## 💻 Usage Example
35
+
36
+ ```python
37
+ from akshare_one import get_hist_data
38
+ from akshare_one.indicators import get_sma
39
+
40
+ # Get historical data
41
+ df = get_hist_data(
42
+ symbol="600000",
43
+ interval="day",
44
+ adjust="hfq"
45
+ )
46
+
47
+ # Calculate 20-day Simple Moving Average
48
+ df_sma = get_sma(df, window=20)
49
+ ```
50
+
51
+ ## 📚 Documentation
52
+
53
+ Detailed API reference: [docs/api.md](docs/api.md)
@@ -0,0 +1,214 @@
1
+ """Akshare One - Unified interface for Chinese market data
2
+
3
+ Provides standardized access to various financial data sources with:
4
+ - Consistent symbol formats
5
+ - Unified data schemas
6
+ - Cleaned and normalized outputs
7
+
8
+ Example:
9
+ >>> from akshare_one import get_hist_data, get_realtime_data
10
+ >>> # 获取股票历史数据
11
+ >>> df = get_hist_data("600000", interval="day")
12
+ >>> print(df.head())
13
+ >>> # 获取股票实时数据
14
+ >>> df = get_realtime_data(symbol="600000")
15
+ """
16
+
17
+ from typing import Optional, Literal
18
+ import pandas as pd
19
+ from .modules.financial.factory import FinancialDataFactory
20
+ from .modules.historical.factory import HistoricalDataFactory
21
+ from .modules.realtime.factory import RealtimeDataFactory
22
+ from .modules.info.factory import InfoDataFactory
23
+ from .modules.news.factory import NewsDataFactory
24
+ from .modules.insider.factory import InsiderDataFactory
25
+
26
+
27
+ def get_basic_info(
28
+ symbol: str, source: Literal["eastmoney"] = "eastmoney"
29
+ ) -> pd.DataFrame:
30
+ """获取股票基础信息
31
+
32
+ Args:
33
+ symbol: 股票代码 (e.g. '600000')
34
+ source: 数据源 ('eastmoney')
35
+
36
+ Returns:
37
+ pd.DataFrame:
38
+ - price: 最新价
39
+ - symbol: 股票代码
40
+ - name: 股票简称
41
+ - total_shares: 总股本
42
+ - float_shares: 流通股
43
+ - total_market_cap: 总市值
44
+ - float_market_cap: 流通市值
45
+ - industry: 行业
46
+ - listing_date: 上市时间
47
+ """
48
+ provider = InfoDataFactory.get_provider(source, symbol=symbol)
49
+ return provider.get_basic_info()
50
+
51
+
52
+ def get_hist_data(
53
+ symbol: str,
54
+ interval: Literal["minute", "hour", "day", "week", "month", "year"] = "day",
55
+ interval_multiplier: int = 1,
56
+ start_date: str = "1970-01-01",
57
+ end_date: str = "2030-12-31",
58
+ adjust: Literal["none", "qfq", "hfq"] = "none",
59
+ source: Literal["eastmoney", "eastmoney_direct", "sina"] = "eastmoney",
60
+ ) -> pd.DataFrame:
61
+ """Get historical market data
62
+
63
+ Args:
64
+ symbol: 股票代码 (e.g. '600000')
65
+ interval: 时间间隔 ('minute','hour','day','week','month','year')
66
+ interval_multiplier: 时间间隔倍数 (e.g. 5 for 5 minutes)
67
+ start_date: 开始日期 (YYYY-MM-DD)
68
+ end_date: 结束日期 (YYYY-MM-DD)
69
+ adjust: 复权类型 ('none','qfq','hfq')
70
+ source: 数据源 ('eastmoney', 'eastmoney_direct', 'sina') (default: 'eastmoney')
71
+
72
+ Returns:
73
+ pd.DataFrame:
74
+ - timestamp: 时间戳(UTC时区)
75
+ - open: 开盘价
76
+ - high: 最高价
77
+ - low: 最低价
78
+ - close: 收盘价
79
+ - volume: 成交量
80
+ """
81
+ kwargs = {
82
+ "symbol": symbol,
83
+ "interval": interval,
84
+ "interval_multiplier": interval_multiplier,
85
+ "start_date": start_date,
86
+ "end_date": end_date,
87
+ "adjust": adjust,
88
+ }
89
+ provider = HistoricalDataFactory.get_provider(source, **kwargs)
90
+ return provider.get_hist_data()
91
+
92
+
93
+ def get_realtime_data(
94
+ symbol: Optional[str] = None,
95
+ source: Literal["eastmoney", "eastmoney_direct", "xueqiu"] = "xueqiu",
96
+ ) -> pd.DataFrame:
97
+ """Get real-time market quotes
98
+
99
+ Args:
100
+ symbol: 股票代码 (如 "600000")
101
+ source: 数据源 ('eastmoney', 'eastmoney_direct', 'xueqiu')
102
+
103
+ Returns:
104
+ pd.DataFrame:
105
+ - symbol: 股票代码
106
+ - price: 最新价
107
+ - change: 涨跌额
108
+ - pct_change: 涨跌幅(%)
109
+ - timestamp: 时间戳
110
+ - volume: 成交量(手)
111
+ - amount: 成交额(元)
112
+ - open: 今开
113
+ - high: 最高
114
+ - low: 最低
115
+ - prev_close: 昨收
116
+ """
117
+ provider = RealtimeDataFactory.get_provider(source, symbol=symbol)
118
+ return provider.get_current_data()
119
+
120
+
121
+ def get_news_data(
122
+ symbol: str, source: Literal["eastmoney"] = "eastmoney"
123
+ ) -> pd.DataFrame:
124
+ """获取个股新闻数据
125
+
126
+ Args:
127
+ symbol: 股票代码 (如 "300059")
128
+ source: 数据源 ('eastmoney')
129
+
130
+ Returns:
131
+ pd.DataFrame:
132
+ - keyword: 关键词
133
+ - title: 新闻标题
134
+ - content: 新闻内容
135
+ - publish_time: 发布时间
136
+ - source: 文章来源
137
+ - url: 新闻链接
138
+ """
139
+ provider = NewsDataFactory.get_provider(source, symbol=symbol)
140
+ return provider.get_news_data()
141
+
142
+
143
+ def get_balance_sheet(symbol: str, source: Literal["sina"] = "sina") -> pd.DataFrame:
144
+ """获取资产负债表数据
145
+
146
+ Args:
147
+ symbol: 股票代码 (如 "600600")
148
+ source: 数据源 ("sina")
149
+
150
+ Returns:
151
+ pd.DataFrame: 资产负债表数据
152
+ """
153
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
154
+ return provider.get_balance_sheet()
155
+
156
+
157
+ def get_income_statement(symbol: str, source: Literal["sina"] = "sina") -> pd.DataFrame:
158
+ """获取利润表数据
159
+
160
+ Args:
161
+ symbol: 股票代码 (如 "600600")
162
+ source: 数据源 ("sina")
163
+
164
+ Returns:
165
+ pd.DataFrame: 利润表数据
166
+ """
167
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
168
+ return provider.get_income_statement()
169
+
170
+
171
+ def get_cash_flow(symbol: str, source: Literal["sina"] = "sina") -> pd.DataFrame:
172
+ """获取现金流量表数据
173
+
174
+ Args:
175
+ symbol: 股票代码 (如 "600600")
176
+ source: 数据源 ("sina")
177
+
178
+ Returns:
179
+ pd.DataFrame: 现金流量表数据
180
+ """
181
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
182
+ return provider.get_cash_flow()
183
+
184
+
185
+ def get_financial_metrics(
186
+ symbol: str, source: Literal["eastmoney"] = "eastmoney"
187
+ ) -> pd.DataFrame:
188
+ """获取三大财务报表关键指标
189
+
190
+ Args:
191
+ symbol: 股票代码 (如 "600600")
192
+ source: 数据源 ('eastmoney')
193
+
194
+ Returns:
195
+ pd.DataFrame: 财务关键指标数据
196
+ """
197
+ provider = FinancialDataFactory.get_provider(source, symbol=symbol)
198
+ return provider.get_financial_metrics()
199
+
200
+
201
+ def get_inner_trade_data(
202
+ symbol: str, source: Literal["xueqiu"] = "xueqiu"
203
+ ) -> pd.DataFrame:
204
+ """获取雪球内部交易数据
205
+
206
+ Args:
207
+ symbol: 股票代码,如"600000"
208
+ source: 数据源 (目前支持 "xueqiu")
209
+
210
+ Returns:
211
+ pd.DataFrame: 内部交易数据
212
+ """
213
+ provider = InsiderDataFactory.get_provider(source, symbol=symbol)
214
+ return provider.get_inner_trade_data()