akshare-one 0.3.7__py3-none-any.whl → 0.3.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.
Files changed (41) hide show
  1. akshare_one/__init__.py +214 -214
  2. akshare_one/eastmoney/client.py +80 -80
  3. akshare_one/eastmoney/utils.py +102 -102
  4. akshare_one/indicators.py +395 -395
  5. akshare_one/modules/cache.py +30 -27
  6. akshare_one/modules/financial/base.py +27 -27
  7. akshare_one/modules/financial/eastmoney_direct.py +183 -183
  8. akshare_one/modules/financial/factory.py +46 -46
  9. akshare_one/modules/financial/sina.py +292 -292
  10. akshare_one/modules/historical/base.py +47 -47
  11. akshare_one/modules/historical/eastmoney.py +236 -236
  12. akshare_one/modules/historical/eastmoney_direct.py +79 -78
  13. akshare_one/modules/historical/factory.py +48 -48
  14. akshare_one/modules/historical/sina.py +250 -250
  15. akshare_one/modules/indicators/base.py +158 -158
  16. akshare_one/modules/indicators/factory.py +33 -33
  17. akshare_one/modules/indicators/simple.py +9 -8
  18. akshare_one/modules/indicators/talib.py +263 -263
  19. akshare_one/modules/info/base.py +25 -25
  20. akshare_one/modules/info/eastmoney.py +51 -51
  21. akshare_one/modules/info/factory.py +44 -44
  22. akshare_one/modules/insider/base.py +28 -28
  23. akshare_one/modules/insider/factory.py +44 -44
  24. akshare_one/modules/insider/xueqiu.py +110 -110
  25. akshare_one/modules/news/base.py +22 -22
  26. akshare_one/modules/news/eastmoney.py +43 -43
  27. akshare_one/modules/news/factory.py +44 -44
  28. akshare_one/modules/realtime/base.py +27 -27
  29. akshare_one/modules/realtime/eastmoney.py +53 -53
  30. akshare_one/modules/realtime/eastmoney_direct.py +36 -36
  31. akshare_one/modules/realtime/factory.py +71 -48
  32. akshare_one/modules/realtime/xueqiu.py +57 -57
  33. akshare_one/modules/utils.py +10 -10
  34. akshare_one/py.typed +0 -0
  35. {akshare_one-0.3.7.dist-info → akshare_one-0.3.9.dist-info}/METADATA +72 -74
  36. akshare_one-0.3.9.dist-info/RECORD +38 -0
  37. akshare_one-0.3.9.dist-info/WHEEL +4 -0
  38. akshare_one-0.3.7.dist-info/RECORD +0 -39
  39. akshare_one-0.3.7.dist-info/WHEEL +0 -5
  40. akshare_one-0.3.7.dist-info/licenses/LICENSE +0 -21
  41. akshare_one-0.3.7.dist-info/top_level.txt +0 -1
@@ -1,10 +1,10 @@
1
- def convert_xieqiu_symbol(symbol: str) -> str:
2
- """
3
- Convert Symbol (600000) to XueQiu Symbol (SH600000)
4
- """
5
- if symbol.startswith("6"):
6
- return f"SH{symbol}"
7
- elif symbol.startswith("0") or symbol.startswith("3"):
8
- return f"SZ{symbol}"
9
- else: # TODO: add more cases
10
- return symbol
1
+ def convert_xieqiu_symbol(symbol: str) -> str:
2
+ """
3
+ Convert Symbol (600000) to XueQiu Symbol (SH600000)
4
+ """
5
+ if symbol.startswith("6"):
6
+ return f"SH{symbol}"
7
+ elif symbol.startswith("0") or symbol.startswith("3"):
8
+ return f"SZ{symbol}"
9
+ else: # TODO: add more cases
10
+ return symbol
akshare_one/py.typed ADDED
File without changes
@@ -1,74 +1,72 @@
1
- Metadata-Version: 2.4
2
- Name: akshare-one
3
- Version: 0.3.7
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.26
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
- | Basic stock info | `get_basic_info` |
44
- | Financial metrics | `get_financial_metrics` |
45
- | Technical indicators | See [indicators.py](akshare-one/indicators.py) |
46
-
47
- ## 📦 Quick Installation
48
-
49
- ```bash
50
- pip install akshare-one
51
- ```
52
-
53
- ## 💻 Usage Example
54
-
55
- ```python
56
- from akshare_one import get_hist_data
57
- from akshare_one.indicators import get_sma
58
-
59
- # Get historical data
60
- df = get_hist_data(
61
- symbol="600000",
62
- interval="day",
63
- adjust="hfq"
64
- )
65
-
66
- # Calculate 20-day Simple Moving Average
67
- df_sma = get_sma(df, window=20)
68
- ```
69
-
70
- ## 📚 Documentation
71
-
72
- Full API documentation is now available on GitHub Pages:
73
-
74
- https://zwldarren.github.io/akshare-one/
1
+ Metadata-Version: 2.4
2
+ Name: akshare-one
3
+ Version: 0.3.9
4
+ Summary: Standardized interface for Chinese financial market data, built on AKShare with unified data formats and simplified APIs
5
+ Keywords: akshare,financial-data,stock-data,quant
6
+ License-Expression: MIT
7
+ Requires-Dist: akshare>=1.17.38
8
+ Requires-Dist: cachetools>=5.5.2
9
+ Requires-Dist: ta-lib>=0.6.4 ; extra == 'talib'
10
+ Requires-Python: >=3.10
11
+ Project-URL: Homepage, https://github.com/zwldarren/akshare-one
12
+ Project-URL: Repository, https://github.com/zwldarren/akshare-one.git
13
+ Provides-Extra: talib
14
+ Description-Content-Type: text/markdown
15
+
16
+ <div align="center">
17
+ <h1>AKShare One</h1>
18
+ <div>
19
+ <a href="README_zh.md">中文</a> | <strong>English</strong>
20
+ </div>
21
+ </div>
22
+
23
+ **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.
24
+
25
+ ## Features
26
+
27
+ - 📊 Unified stock code formats across data sources
28
+ - 🏗️ Standardized return data structures
29
+ - 🛠️ Simplified API parameter design
30
+ - ⏱️ Automatic timestamp and adjustment handling
31
+
32
+ ## 🚀 Core Features
33
+
34
+ | Function | Interface |
35
+ |------|------|
36
+ | Historical data | `get_hist_data` |
37
+ | Real-time quotes | `get_realtime_data` |
38
+ | Stock news | `get_news_data` |
39
+ | Financial data | `get_balance_sheet`/`get_income_statement`/`get_cash_flow` |
40
+ | Internal transactions | `get_inner_trade_data` |
41
+ | Basic stock info | `get_basic_info` |
42
+ | Financial metrics | `get_financial_metrics` |
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
+ Full API documentation is now available on GitHub Pages:
71
+
72
+ https://zwldarren.github.io/akshare-one/
@@ -0,0 +1,38 @@
1
+ akshare_one/__init__.py,sha256=7dcbef8067091020c508b00f08297d8a334355998178daddee7200a0a5e90f2d,6310
2
+ akshare_one/eastmoney/client.py,sha256=cfd3e2d7b8423eef437da8a500438a4a0ab529f1b0e51b8053839c223c87ff6f,2754
3
+ akshare_one/eastmoney/utils.py,sha256=f603a58181b3fd2f1f4ae5a0244210079bc490e3b3eb8f4118e7212cc7476c74,2833
4
+ akshare_one/indicators.py,sha256=0a5b7184ca32eaa6e240a22adaf79343ac6c7f8feaec8af7670f087c7cabe052,12138
5
+ akshare_one/modules/cache.py,sha256=5821ee713873c16db5519971997cd066d7e3589c501bb169b548424d2d5b4cf6,1048
6
+ akshare_one/modules/financial/base.py,sha256=4cd4e4e557a39a9332e23ebc030e7d764e8ceb18b24a529d0cbc13795b1f403e,661
7
+ akshare_one/modules/financial/eastmoney_direct.py,sha256=8ed268b80b1f1b2e8b1a00e10853b6d6a511a209cc316cdda5671228d2f36d39,6654
8
+ akshare_one/modules/financial/factory.py,sha256=3711d2d9603fec67c1a64ac0b2c50e931969a68ff10907b36da0202ec2c64880,1462
9
+ akshare_one/modules/financial/sina.py,sha256=842cb53777b2f9f482f517f5e10ef224594d0ae73ae148f328a412800d3ee978,12557
10
+ akshare_one/modules/historical/base.py,sha256=007bcc2617e9908382ce7d2015b3efaacff8eb578e9c8b494fc9cccc1d9c4f7c,1260
11
+ akshare_one/modules/historical/eastmoney.py,sha256=1bc124e25b045272d848e4e74d66a39bd4196b2c6b6310f59406fdca22b5664d,8031
12
+ akshare_one/modules/historical/eastmoney_direct.py,sha256=28d5ce8112124b70a2e479f4f45d9a1524e1ca0396e346870a08940986b5dea6,2817
13
+ akshare_one/modules/historical/factory.py,sha256=d6ef2e6f251b748161638b8038b310ba2a20a6a3a72d09a972cc09ba49e68965,1556
14
+ akshare_one/modules/historical/sina.py,sha256=fe47ffc816a08e1ac4e76e2cfa35ac3e96a3fc75e8a19b7b6f2dac8dad64c2c1,8553
15
+ akshare_one/modules/indicators/__init__.py,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
16
+ akshare_one/modules/indicators/base.py,sha256=a0d7cfda9d593be8dd57d032ec21023bb2eb1421acf72dd7c60edec20f6e019d,4218
17
+ akshare_one/modules/indicators/factory.py,sha256=adef68876b355e62c30a06792e47f95dc69b61e04452c37d7679a95c7d441d52,1004
18
+ akshare_one/modules/indicators/simple.py,sha256=c5f8f45623a8729f641c1feb5cbb382aa998865a879b0b71b1706e5df64b1052,15631
19
+ akshare_one/modules/indicators/talib.py,sha256=e777939562752efca02761af9eb0c61e7c5aee12f06f4e5cc9aecc9ff93c6a1a,10535
20
+ akshare_one/modules/info/base.py,sha256=521ab671ffb35ad103ece2609565a0f4ae8e954f7f1153fc75c6a2deea88721e,672
21
+ akshare_one/modules/info/eastmoney.py,sha256=e09c4768a0952b6a2499e12873597861158d22ebda12b13779f58ecffbff03d8,1590
22
+ akshare_one/modules/info/factory.py,sha256=b764e1cf8a02c5db3c30160bd9ef5c303478cbec7355092cde38aeceb30a0c9a,1304
23
+ akshare_one/modules/insider/base.py,sha256=41fcd392c9e307b26538ca091fcb5c5e45ae6b26da653e4ec0841efb63002f4b,938
24
+ akshare_one/modules/insider/factory.py,sha256=705b71b6ffa1ec23e8f711d2d4e7f4ec377ad125acff18c4a402cad4fea6ac76,1320
25
+ akshare_one/modules/insider/xueqiu.py,sha256=452bd546b8468136edaa746cf32c7c269ccded6299ee52717404ef694b3490e8,3837
26
+ akshare_one/modules/news/base.py,sha256=766ff593dd722a329c2945aac0d1b227fb4d93752406bd95d04d6231bab045f1,553
27
+ akshare_one/modules/news/eastmoney.py,sha256=c801158f14bcde87ef1c7302da018acb39ad8816d7dc2f4022625fc0ce6b67ee,1218
28
+ akshare_one/modules/news/factory.py,sha256=7cf63b9fa032eff85dd0a81cab9e2f67bad073c363ab3513a76afa8f0358c2ae,1304
29
+ akshare_one/modules/realtime/base.py,sha256=5ed0fee0bd690ab32d7dbc2d651eed3ff061581fde316b6942bf3dac0757ecfe,702
30
+ akshare_one/modules/realtime/eastmoney.py,sha256=a6eaae0a287ce2475134c93ec1e1467dccf26c844b57a944e1638d59c7b47b80,1545
31
+ akshare_one/modules/realtime/eastmoney_direct.py,sha256=f489e8ebd355456322775423285ffefc05c4a975ba88413e0895cb5666a0c521,1200
32
+ akshare_one/modules/realtime/factory.py,sha256=af34b9ca8f68a53ceabe3990dfd3b70df014b240057d7632dbcf2757cc2ce793,2362
33
+ akshare_one/modules/realtime/xueqiu.py,sha256=6e4bdc7b3e4c8946c840103d1ccca92eaea5b3fd277803848c9674954621b771,2155
34
+ akshare_one/modules/utils.py,sha256=1f89eb19ff26e3f7b34e25b9f8e70d3f1a55fa779361f7df11f68e2c314b63d6,323
35
+ akshare_one/py.typed,sha256=e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855,0
36
+ akshare_one-0.3.9.dist-info/WHEEL,sha256=76443c98c0efcfdd1191eac5fa1d8223dba1c474dbd47676674a255e7ca48770,79
37
+ akshare_one-0.3.9.dist-info/METADATA,sha256=fb647ab62beb9ed2eebb9a4eb54958b4878bd869f17b405c52e2923a645d1c1c,2155
38
+ akshare_one-0.3.9.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: uv 0.8.12
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -1,39 +0,0 @@
1
- akshare_one/__init__.py,sha256=htgTumncxiGHqXMgqmBuIQXoPBcOnwcTjCg02Ydr73I,6524
2
- akshare_one/indicators.py,sha256=x3Amff9CG_GvQpA-sqGfFwEAIvaaXlBxDfzTxD05taQ,12533
3
- akshare_one/eastmoney/client.py,sha256=SSMB4oupaCns5hxtSwxaX-UE_uOrxZEGxqUiC3BT-4k,2794
4
- akshare_one/eastmoney/utils.py,sha256=fATw0L5SW14wHWXlJ4IFEqnSsSBMT8MYGevxo7Kf1nY,2935
5
- akshare_one/modules/cache.py,sha256=_3n35rt9xJfQzZSV6JZ6bGzf2VnqTmLfe49WXk4c9K8,867
6
- akshare_one/modules/utils.py,sha256=msHqsjWSRULbX-3Bnit1p26a4a7MOEuNfkPSaECXr4k,333
7
- akshare_one/modules/financial/base.py,sha256=TG3ncf3rXfgWCk4qUORN01uxT1SgLWiyjkt5Jb9eoxo,688
8
- akshare_one/modules/financial/eastmoney_direct.py,sha256=BwiUWi3X24qbtrQv5ht2Lj6crgFrhdcgW4Aa53ZFEOg,6725
9
- akshare_one/modules/financial/factory.py,sha256=9xR_uKt7n8dndYUxEGDDL65LXnbm-edtTLdhF0Bfyro,1468
10
- akshare_one/modules/financial/sina.py,sha256=c6rSxCVNU6h-7XWSiqPHDN_XAhRdGHdqI9Haruy3mDs,12801
11
- akshare_one/modules/historical/base.py,sha256=kDy76OJUp-LIddsC23YAQdf4Q_YGCrnZ8AvU4xRzQsI,1286
12
- akshare_one/modules/historical/eastmoney.py,sha256=B1H67o1bj8RjaKhfRu0xSA0MoQTEXz_6gRUNg138gJU,8252
13
- akshare_one/modules/historical/eastmoney_direct.py,sha256=cBT5_tz6a4qEV5KMiyFBdOfEVTLlJfT2o4uNBIu137Y,2854
14
- akshare_one/modules/historical/factory.py,sha256=qfMod5HSV-itE-i1ludIp0w8Zq7Vjp2LPomajVd5Kjc,1548
15
- akshare_one/modules/historical/sina.py,sha256=sQoUnQlkxyI4i7Cuw5YwKT3IoNM8-K5wleusVM_tKJA,8761
16
- akshare_one/modules/indicators/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
17
- akshare_one/modules/indicators/base.py,sha256=DhFivpVIUIkdIv24U2WoOy1GCDySxsw0tD0-rBRe5Lc,4376
18
- akshare_one/modules/indicators/factory.py,sha256=pKx57oej_L0Lz3kkXwzVievKpOYph0T_Y7fzSwO3Zd4,1021
19
- akshare_one/modules/indicators/simple.py,sha256=fwkM7tqqu6JIX_jv5_w6klrGO3s3WCJTz87xy4dy-Hc,15479
20
- akshare_one/modules/indicators/talib.py,sha256=w0KpV-BXVxU0LmWs_EbXJUFgo9dbMeUQijjJMkjtWtU,10773
21
- akshare_one/modules/info/base.py,sha256=Kof-e1I2usx1VOc1d05kyL-8B_QEDOsbry4R3dV0zZE,697
22
- akshare_one/modules/info/eastmoney.py,sha256=pvWLcVoVWwgZS_4Bg-OtHQW5SPCZ9I1PAFbN4yqluq0,1610
23
- akshare_one/modules/info/factory.py,sha256=xvwPrgce0p9U4qAQBJM7FFw3zJks6m2hLHwHf0t1rfU,1308
24
- akshare_one/modules/insider/base.py,sha256=bJoyNSoa0o8py6GqjlMRIEV6DbOoc2OEOyE0vmjT_n4,966
25
- akshare_one/modules/insider/factory.py,sha256=32bueJA3E8yCZc0v5EAen_48RZ23yojYzpzaZyQ6WnA,1324
26
- akshare_one/modules/insider/xueqiu.py,sha256=7PfyRioZ6KHW82sbXYcc1yNF6QGPS-kPG7i91YoxNfU,3932
27
- akshare_one/modules/news/base.py,sha256=t8b_RBRDQ_HyqGHQWVzojbonNJmwp2p1ckpyYPaSmdY,575
28
- akshare_one/modules/news/eastmoney.py,sha256=kKNBmd-PRzMJVDauL_QIrFduB_E0vp96pLCuVsE3L-k,1245
29
- akshare_one/modules/news/factory.py,sha256=3FMkNBpYF7l-v2NHHR5TzbvklQNzJ-R_XzG8AlRjJcg,1308
30
- akshare_one/modules/realtime/base.py,sha256=eYicSs7E4qmcpQ-8TnbfmJvsK0VQoezVK7Zobqh5xPk,729
31
- akshare_one/modules/realtime/eastmoney.py,sha256=6acJeIdrvkW4ZqM9CALithlx85QSogrlPLSo-yKhQ8w,1582
32
- akshare_one/modules/realtime/eastmoney_direct.py,sha256=A2ScBRfIP6n_BxQ6muB26AEykIvTG7Mt3BDAZMyugkg,1236
33
- akshare_one/modules/realtime/factory.py,sha256=_7jBDgqWqkt5xTTT1SpZoUHM9IpMRpcUQeyyCglM5z0,1528
34
- akshare_one/modules/realtime/xueqiu.py,sha256=CHTN5VUwo24H-2EGKQkN8oqr3MWjDi-7DpvQEDyPlls,2196
35
- akshare_one-0.3.7.dist-info/licenses/LICENSE,sha256=3bqxoD7aU4QS7kpNtQmRd4MikxXe6Gtm_DrojyFHGAc,1087
36
- akshare_one-0.3.7.dist-info/METADATA,sha256=R2t-LPC6OnmV95Ec_Y6P0Hu0W8sctFC5GjRlLBSGCdQ,2272
37
- akshare_one-0.3.7.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
38
- akshare_one-0.3.7.dist-info/top_level.txt,sha256=kNiucyLVAGa89wmUSpXbBLWD7pF_RuahuiaOfLHZSyw,12
39
- akshare_one-0.3.7.dist-info/RECORD,,
@@ -1,5 +0,0 @@
1
- Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
3
- Root-Is-Purelib: true
4
- Tag: py3-none-any
5
-
@@ -1,21 +0,0 @@
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 +0,0 @@
1
- akshare_one