simonlin1212/a-stock-data
A股全栈数据工具包 — 7层架构 · 28端点 · 13数据源 · 零第三方依赖 | Full-stack China A-Share data toolkit for AI coding assistants
View Origin LinkProduct Positioning & Context
A股全栈数据工具包 — 7层架构 · 28端点 · 13数据源 · 零第三方依赖 | Full-stack China A-Share data toolkit for AI coding assistants
Related Ecosystem & Alternatives
Discover adjacent products, open-source repositories, and developer tools sharing similar technical architecture.
Deep-Dive FAQs
What is simonlin1212/a-stock-data?
simonlin1212/a-stock-data is a digital product or tool described as: A股全栈数据工具包 — 7层架构 · 28端点 · 13数据源 · 零第三方依赖 | Full-stack China A-Share data toolkit for AI coding assistants
Where did simonlin1212/a-stock-data originate?
Data for simonlin1212/a-stock-data was aggregated directly from the GitHub Open Source community ecosystem, representing raw developer and early-adopter sentiment.
When was simonlin1212/a-stock-data publicly launched?
The initial public indexing or launch date for simonlin1212/a-stock-data within our tracked developer communities was recorded on May 11, 2026.
How popular is simonlin1212/a-stock-data?
simonlin1212/a-stock-data has achieved measurable traction, logging over 2,053 traction score and facilitating 460 recorded discussions or engagements.
Are there active development issues for simonlin1212/a-stock-data?
Yes, we are currently tracking open architectural debates and bug reports for this project on GitHub. There are currently 2 active high-priority issues logged recently.
What are some commercial alternatives to simonlin1212/a-stock-data?
Our semantic intelligence engine identifies potential commercial alternatives in the SaaS space, such as Osaurus, which offers overlapping value propositions.
How does the creator describe simonlin1212/a-stock-data?
The original author or development team describes the product as follows: "A股全栈数据工具包 — 7层架构 · 28端点 · 13数据源 · 零第三方依赖 | Full-stack China A-Share data toolkit for AI coding assistants"
Active Developer Issues (GitHub)
Logged: May 13, 2026
Logged: May 13, 2026
Community Voice & Feedback
@tkdchen 理论上可以,但实际效果有限。
把脚本移出 SKILL.md 到独立文件的话,AI agent 就没法直接在 skill 里看到代码了,需要额外一步"读取文件"的操作。而且当前架构下,agent 是在读取 SKILL.md 时就理解了所有端点的调用方式,如果代码在外部文件里,agent 可能理解不完整。
更有效的降 token 方案:
1. **在 prompt 里明确告诉 agent 按需调取**(只调跟当前分析相关的端点)
2. 后续考虑做一个"轻量版 SKILL.md",只包含端点描述和参数,不内嵌完整代码
把脚本移出 SKILL.md 到独立文件的话,AI agent 就没法直接在 skill 里看到代码了,需要额外一步"读取文件"的操作。而且当前架构下,agent 是在读取 SKILL.md 时就理解了所有端点的调用方式,如果代码在外部文件里,agent 可能理解不完整。
更有效的降 token 方案:
1. **在 prompt 里明确告诉 agent 按需调取**(只调跟当前分析相关的端点)
2. 后续考虑做一个"轻量版 SKILL.md",只包含端点描述和参数,不内嵌完整代码
感谢 @jhming1 的详细排查和修复!
总结一下:这是 **akshare 上游在 pandas 3.0 + pyarrow 环境下的兼容 bug**(`regex=True` 对 ` ` 的处理),不是本项目的问题。
解决方案(任选其一):
1. 改 akshare 源码 `regex=True` → `regex=False`(如你所述)
2. 调用前关闭 Arrow 字符串推断:`pd.set_option("future.infer_string", False)`
3. 直接用东方财富原始接口绕过 akshare(见上方评论)
留着这个 issue 给后来者参考,现在关闭。
总结一下:这是 **akshare 上游在 pandas 3.0 + pyarrow 环境下的兼容 bug**(`regex=True` 对 ` ` 的处理),不是本项目的问题。
解决方案(任选其一):
1. 改 akshare 源码 `regex=True` → `regex=False`(如你所述)
2. 调用前关闭 Arrow 字符串推断:`pd.set_option("future.infer_string", False)`
3. 直接用东方财富原始接口绕过 akshare(见上方评论)
留着这个 issue 给后来者参考,现在关闭。
我修复好了。
问题根因与修复
根因:pandas 3.0 + pyarrow 组合下,str.replace(r"\u3000", "", regex=True) 中的 r"\u3000" 被 pyarrow Arrow StringArray 解析为无效正则转义序列,导致崩溃。
\u3000 是全角空格,本来就不需要正则匹配,完全是普通字符串替换。
修复:把 regex=True 改为 regex=False 即可:
python
复制
# 修复前(有bug)
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=True)
# 修复后
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=False)
文件位置:~Python\Lib\site-packages\akshare\news\news_stock.py 第 116 行。
问题根因与修复
根因:pandas 3.0 + pyarrow 组合下,str.replace(r"\u3000", "", regex=True) 中的 r"\u3000" 被 pyarrow Arrow StringArray 解析为无效正则转义序列,导致崩溃。
\u3000 是全角空格,本来就不需要正则匹配,完全是普通字符串替换。
修复:把 regex=True 改为 regex=False 即可:
python
复制
# 修复前(有bug)
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=True)
# 修复后
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=False)
文件位置:~Python\Lib\site-packages\akshare\news\news_stock.py 第 116 行。
Successfully installed akshare-1.18.60
C:\Users\0215>python
Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import akshare as ak
>>> df = ak.stock_news_em(symbol="688017")
Traceback (most recent call last):
File "", line 1, in
df = ak.stock_news_em(symbol="688017")
File "E:\Python\Python313\Lib\site-packages\akshare\news\news_stock.py", line 116, in stock_news_em
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Python\Python313\Lib\site-packages\pandas\core\strings\accessor.py", line 142, in wrapper
return func(self, *args, **kwargs)
File "E:\Python\Python313\Lib\site-packages\pandas\core\strings\accessor.py", line 1814, in replace
result = res_output.array._str_replace(
key, value, n=n, cas...
C:\Users\0215>python
Python 3.13.0 (tags/v3.13.0:60403a5, Oct 7 2024, 09:38:07) [MSC v.1941 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import akshare as ak
>>> df = ak.stock_news_em(symbol="688017")
Traceback (most recent call last):
File "", line 1, in
df = ak.stock_news_em(symbol="688017")
File "E:\Python\Python313\Lib\site-packages\akshare\news\news_stock.py", line 116, in stock_news_em
temp_df["新闻内容"] = temp_df["新闻内容"].str.replace(r"\u3000", "", regex=True)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\Python\Python313\Lib\site-packages\pandas\core\strings\accessor.py", line 142, in wrapper
return func(self, *args, **kwargs)
File "E:\Python\Python313\Lib\site-packages\pandas\core\strings\accessor.py", line 1814, in replace
result = res_output.array._str_replace(
key, value, n=n, cas...
把内嵌的脚本移出到独立的脚本文件里是不是能降低token消耗量?
哈哈确实,数据端点比较多,全量调一遍 token 消耗不小。
建议让你的 agent 按需调取,不要一次性拉所有端点。比如:
- 只看技术面 → 调 K线 + 技术指标
- 只看基本面 → 调 财务数据 + 估值
- 看新闻舆情 → 调 新闻 + 研报
在 prompt 里跟 agent 说清楚"只调取与当前分析相关的数据,不要全部拉取",token 消耗会降很多。
建议让你的 agent 按需调取,不要一次性拉所有端点。比如:
- 只看技术面 → 调 K线 + 技术指标
- 只看基本面 → 调 财务数据 + 估值
- 看新闻舆情 → 调 新闻 + 研报
在 prompt 里跟 agent 说清楚"只调取与当前分析相关的数据,不要全部拉取",token 消耗会降很多。
你好,刚实测了一下,`ak.stock_news_em` 在最新版 akshare 上是正常可用的。
这个接口底层调的是**东方财富搜索 API**,原始接口地址:
```
https://search-api-web.eastmoney.com/search/jsonp
```
如果 akshare 那层有问题,你可以直接用原始接口:
```python
import json, re
from curl_cffi import requests
def get_stock_news(symbol: str, page_size: int = 10):
"""东方财富个股新闻(原始接口)"""
url = "https://search-api-web.eastmoney.com/search/jsonp"
inner_param = {
"uid": "",
"keyword": symbol,
"type": ["cmsArticleWebOld"],
"client": "web",
"clientType": "web",
"clientVersion": "curr",
"param": {
"cmsArticleWebOld": {
"searchScope": "default",
"sort": "default",
"pageIndex": 1,
"pageSize": page_size,
"preTag": "",
"postTag": "",
}
},
}
params = {
"cb": "jQuery35101792940631092459_1764599530165",
"param": json.dumps(inner_param, ensure_ascii=False),...
这个接口底层调的是**东方财富搜索 API**,原始接口地址:
```
https://search-api-web.eastmoney.com/search/jsonp
```
如果 akshare 那层有问题,你可以直接用原始接口:
```python
import json, re
from curl_cffi import requests
def get_stock_news(symbol: str, page_size: int = 10):
"""东方财富个股新闻(原始接口)"""
url = "https://search-api-web.eastmoney.com/search/jsonp"
inner_param = {
"uid": "",
"keyword": symbol,
"type": ["cmsArticleWebOld"],
"client": "web",
"clientType": "web",
"clientVersion": "curr",
"param": {
"cmsArticleWebOld": {
"searchScope": "default",
"sort": "default",
"pageIndex": 1,
"pageSize": page_size,
"preTag": "",
"postTag": "",
}
},
}
params = {
"cb": "jQuery35101792940631092459_1764599530165",
"param": json.dumps(inner_param, ensure_ascii=False),...
Discovery Source
GitHub Open Source Aggregated via automated community intelligence tracking.
Tech Stack Dependencies
No direct open-source NPM package mentions detected in the product documentation.
Media Tractions & Mentions
No mainstream media stories specifically mentioning this product name have been intercepted yet.
Deep Research & Science
No direct peer-reviewed scientific literature matched with this product's architecture.
SaaS Metrics