NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI
PyPI, #4164 most downloaded on PyPI
AKShare is an elegant and simple financial data interface library for Python, built for human beings!
Latest stable
1.20.38
Last release 10 days ago
12 Nov 2026
Release timing varies
gaps range from 8 days to 2 months
Nearly every release is documented
notes for 55 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
264 releases · first in 2025
Drag across the ruler to compare, or tap a release to open it.
fix(futures): 修复 match_main_contract 漏掉无连续行的品种并剔除过期合约
fix(futures): 修复 match_main_contract 漏掉无连续行的品种并剔除过期合约 (#7497)
新浪没有提供“连续”行的品种(如 10 年期国债期货)改为取持仓量最大的合约;有“连续”行的品种取与其字段一致最多的合约,不再要求全部字段完全相同。按交易日期剔除已停止交易品种的过期合约。修复上期所品种列表行长不一致触发的 pandas 弃用告警。
修复 match_main_contract 接口:新浪没有提供“连续”行的品种(如 10 年期国债期货)不再告警“无主力合约”并被漏掉,改为取持仓量最大的合约;有“连续”行的品种改为取与其字段一致最多的合约,不再要求全部字段完全相同( #7497 )
match_main_contract 接口不再返回已停止交易品种的过期合约(如动力煤 ZC2212 、强麦 WH2303 、粳稻 JR2301 ),早籼稻、晚籼稻也不再告警
修复上期所品种列表各行字段数不一致时触发的 pandas 弃用告警
match_main_contract 接口:新浪没有提供“连续”行的品种(如 10 年期国债期货)不再告警“无主力合约”并被漏掉,改为取持仓量最大的合约;有“连续”行的品种改为取与其字段一致最多的合约,不再要求全部字段完全相同(#7497)match_main_contract 接口不再返回已停止交易品种的过期合约(如动力煤 ZC2212、强麦 WH2303、粳稻 JR2301),早籼稻、晚籼稻也不再告警(v1-20-37)=
Your coding agent can read these notes before it upgrades. Set up the MCP server →
feat(registry): 接口登记新增 rate_limit 字段,标注东方财富 push2 行情接口
feat(registry): 接口登记新增 rate_limit 字段,标注东方财富 push2 行情接口 (#7495)
* feat(registry): 接口登记新增 rate_limit 字段,标注东方财富 push2 行情接口
东方财富 push2 系行情服务器(push2、push2his、push2ex、push2delay 及编号子域)在短时间内请求较多时会临时封禁来源 IP,而数据中心、基金、F10 等其他东方财富服务器不受影响。只看接口名后缀无法区分,例如 stock_zh_a_hist 没有 _em 后缀却请求 push2his,宏观、龙虎榜等带 _em 的接口则不受限。
- scripts/build_registry.py 静态追踪每个接口(含其调用的辅助函数与模块级常量,最多 3 层)实际请求的地址,请求 push2 的接口在 interfaces.json 中记为 rate_limit="eastmoney_push2",其余为 null;仍只依赖标准库,不导入 akshare
- push2 主机规则复制自 akshare/utils/http.py 的 _PUSH2_HOST,由测试校验两处一致
- 共标注 97 个接口;pre-commit 的 build-interface-registry 改为在接口源码变动时也运行
- docs/search.md 补充 interface_info 的 rate_limit 字段说明
* chore(release): 1.20.37
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
接口元数据新增 rate_limit 字段(#7495):请求东方财富 push2 行情服务器的 97 个接口记为 "eastmoney_push2",其余为 None,可通过 ak.interface_info 查看。这类服务器在短时间内请求较多时会临时封禁来源 IP,所有东方财富行情接口约 5 分钟以上无法使用,详见 常见问题 ;东方财富数据中心、基金、F10 等接口不受影响。只看接口名无法区分,例如 stock_zh_a_hist 没有 _em 后缀却请求 push2his,宏观、龙虎榜等带 _em 的接口则不受限
该字段由 scripts/build_registry.py 静态分析接口源码中实际请求的地址生成,不再只依赖文档;pre-commit 的接口注册表检查改为在接口源码变动时也运行
常见问题 <faq-eastmoney-ratelimit>;东方财富数据中心、基金、F10 等接口不受影响。只看接口名无法区分,例如 stock_zh_a_hist 没有 _em 后缀却请求 push2his,宏观、龙虎榜等带 _em 的接口则不受限(v1-20-36)=
不兼容的改动:stock_zh_index_daily_tx 的 amount 列由成交量(手)改为成交额(元),并新增 volume、turnover 两列。 此前腾讯日 K 数据的第 5 位实为成交量,却被命名为 amount,真正的成交额被丢弃;以 sh000300 2026-11-06 为例
不兼容的改动:stock_zh_index_daily_tx 的 amount 列由成交量(手)改为成交额(元),并新增 volume、turnover 两列。 此前腾讯日 K 数据的第 5 位实为成交量,却被命名为 amount,真正的成交额被丢弃;以 sh000300 2026-11-06 为例,原 amount 列为 192,152,012,实际成交额为 4788 亿元。按旧口径使用 amount 列的代码,请改用 volume 列(单位已由手换算为股,数值乘了 100)。
修复 stock_zh_index_daily_tx 把成交量错标为 amount 的问题(#7494,感谢 @deepwzh):现返回 date、open、close、high、low、volume、turnover、amount 八列,其中 volume 为成交量(股),turnover 为换手率(小数,0.0125 即 1.25%),amount 为成交额(元),与 stock_zh_a_hist_tx 口径一致。该接口也接受股票代码,科创板(sh688、sh689)的成交量腾讯已按股返回,不再乘 100。实测 sh000300、sh000001(含 1992 年数据)、sh600519、sh688981 的成交额除以成交量均落在合理区间
原始数据不足 9 个字段时抛出 DataParsingError,无数据时返回带列名的空表
按位置赋列名的写法降至 481 处
不兼容的改动:stock_zh_index_daily_tx 的 amount 列由成交量(手)改为成交额(元),并新增 volume、turnover 两列。 此前腾讯日 K 数据的第 5 位实为成交量,却被命名为 amount,真正的成交额被丢弃;以 sh000300 2026-11-06 为例,原 amount 列为 192,152,012,实际成交额为 4788 亿元。按旧口径使用 amount 列的代码,请改用 volume 列(单位已由手换算为股,数值乘了 100)。
(v1-20-35)=
fix(bond): 修复 bond_info_cm 与 bond_info_detail_cm 接口
fix(bond): 修复 bond_info_cm 与 bond_info_detail_cm 接口
- 中国货币网要求必须指定债券类型,只按简称或代码查询返回“债券类型必选”导致 KeyError;未传 bond_type 时依次按各类型查询,查到即停;无任何条件时抛出 APIError
- 上游连续请求偶发返回非 JSON,经 request_with_retry 重试
- bond_info_detail_cm 默认值与文档示例改为 24国开10,文档补充 bond_type 说明;新增离线测试
- fx_china_bank_sina、index_research_sw、stock_board_industry_ths、stock_info 共 8 处改为按字段名映射,29 个调用改动前后输出一致
- 按位置赋列名基线降至 483 处
- 版本 1.20.35
修复 bond_info_cm 只按债券简称或代码查询时、以及 bond_info_detail_cm 报 KeyError: 'pageTotal' 的问题:中国货币网要求查询债券信息时必须指定债券类型,否则返回“债券类型必选”。现在未传 bond_type 但传入 bond_name 或 bond_code 时,依次按各债券类型查询,查到即停(查不到时约需 20 秒);什么条件都不传时抛出 APIError 说明原因。连续请求时上游偶发返回非 JSON 内容,现会重试。bond_info_detail_cm 的默认值与文档示例改为 24国开10,文档补充 bond_type 的说明
fx_china_bank_sina(1 处)、index_research_sw(申万指数,2 处)、stock_board_industry_ths(1 处)、stock_info(股票列表,4 处)由按位置命名改为按上游字段名或表头映射;逐一实测 29 个调用改动前后返回结果一致。此前用于前后对比的采集脚本会漏掉带 lru_cache 等装饰器的函数,这几个模块中被漏掉的调用这次一并补测
按位置赋列名的写法降至 483 处
KeyError: 'pageTotal' 的问题:中国货币网要求查询债券信息时必须指定债券类型,否则返回“债券类型必选”。现在未传 bond_type 但传入 bond_name 或 bond_code 时,依次按各债券类型查询,查到即停(查不到时约需 20 秒);什么条件都不传时抛出 APIError 说明原因。连续请求时上游偶发返回非 JSON 内容,现会重试。bond_info_detail_cm 的默认值与文档示例改为 24国开10,文档补充 bond_type 的说明(v1-20-34)=
refactor: 按字段名映射财报、限售解禁、分析师、乐咕乐股、外汇报价与国证指数接口列名
refactor: 按字段名映射财报、限售解禁、分析师、乐咕乐股、外汇报价与国证指数接口列名
- stock_report_em 4 处、stock_restricted_em 4 处、stock_analyst_em 3 处、stock_a_pe_and_pb 3 处、fx_quote 3 处、index_cni 2 处、futures_basis 1 处改为按字段名或表头映射,改动前后输出一致(外汇报价仅行情变化)
- 修正 index_cni __main__ 中 index_detail_hist_cni 多传 date 参数导致的 TypeError
- 按位置赋列名基线降至 491 处
- 版本 1.20.34
stock_report_em(资产负债表、利润表、现金流量表,4 处)、stock_restricted_em(限售解禁,4 处)、stock_analyst_em(分析师指数,3 处)、stock_a_pe_and_pb(乐咕乐股市盈率,3 处)、fx_quote(人民币外汇报价,3 处)、index_cni(国证指数,2 处)、futures_basis(现货与基差,1 处)由按位置命名改为按上游字段名或表头映射;逐一实测改动前后返回结果一致,其中外汇报价为实时数据,确认货币对与列名一致、仅报价随行情变化
模块 index_cni 的 main 中 index_detail_hist_cni 示例多传了不存在的 date 参数,运行即报 TypeError,现已去掉;接口本身与文档不受影响
stock_zh_ah_tx、stock_market_legu、fund_rating、stock_board_concept_ths 的上游返回无字段名的数组,保持按位置命名
按位置赋列名的写法降至 491 处
__main__ 中 index_detail_hist_cni 示例多传了不存在的 date 参数,运行即报 TypeError,现已去掉;接口本身与文档不受影响(v1-20-33)=
fix: 修复香港基金排行错列、广期所结算参数与股权质押机构分布接口
fix: 修复香港基金排行错列、广期所结算参数与股权质押机构分布接口
- fund_hk_rank_em:上游每条记录字段顺序不固定,按位置命名导致整体错列,改为按字段名映射,更新文档数据示例
- fund_hk_fund_hist_em:停止披露净值的基金返回空表,不再报 KeyError
- futures_settle_gfex:广期所去掉两个持仓限额字段导致 Length mismatch,改为按字段名映射并保留空列
- stock_gpzy_distribute_statistics_company_em/bank_em:东财机构类型改为“证券Ⅱ”“银行Ⅱ”,更新筛选值并按字段名映射
- stock_gpzy_em、futures_settle、bond_cbond、fund_rank_em 共 11 处改为按字段名映射;按位置赋列名基线降至 511 处
- 版本 1.20.33
修复 fund_hk_rank_em 返回错列数据的问题:天天基金香港基金排行每条记录的字段顺序不固定,原代码按位置命名,“基金代码”列实为币种、“基金简称”列实为基金代码、“日期”列为 1970 年、“可购买”列实为基金全称,且不报错;现按 HKFCODE、FCODE、SHORTNAME、CURRENCY、JZRQ、NAV、W、M、Q、HY、Y、TWY、TRY、SY、SE、ISBUY 等字段名映射,并与 fund_hk_fund_hist_em 的净值交叉核对一致
修复 fund_hk_fund_hist_em 查询已停止披露净值的基金时报 KeyError 的问题,现在返回带列名的空表
修复 futures_settle_gfex 以及 futures_settle(market="GFEX") 报 Length mismatch 的问题:广州期货交易所不再返回自营与客户持仓限额两个字段;现按字段名映射,self_tot_buy_posi_quota、client_buy_posi_quota 两列保留并填空值
修复 stock_gpzy_distribute_statistics_company_em、stock_gpzy_distribute_statistics_bank_em 报 TypeError: 'NoneType' object is not subscriptable 的问题:东方财富把质押机构类型由“证券”“银行”改为“证券Ⅱ”“银行Ⅱ”,按旧值筛选返回空;现改用新值,并按字段名映射列名
stock_gpzy_em(4 处)、futures_settle(4 处)、bond_cbond(2 处)、fund_rank_em(fund_money_rank_em 1 处)由按位置命名改为按上游字段名映射;前三个模块逐一实测改动前后返回结果一致,fund_money_rank_em 因上游数据在两次采集之间更新,未做前后对比
按位置赋列名的写法降至 511 处
Length mismatch 的问题:广州期货交易所不再返回自营与客户持仓限额两个字段;现按字段名映射,self_tot_buy_posi_quota、client_buy_posi_quota 两列保留并填空值TypeError: 'NoneType' object is not subscriptable 的问题:东方财富把质押机构类型由“证券”“银行”改为“证券Ⅱ”“银行Ⅱ”,按旧值筛选返回空;现改用新值,并按字段名映射列名(v1-20-32)=
fix(alternative): 艺恩日票房 date 默认为空字符串,表示前一天
fix(alternative): 艺恩日票房 date 默认为空字符串,表示前一天
- movie_boxoffice_daily、movie_boxoffice_cinema_daily 的默认值 "20240219" 已无法匿名查询,改为空字符串表示前一天;指定日期的用法不变
- 同步 docstring、文档参数说明与 __main__ 示例
不兼容的改动:移除艺恩周票房接口 movie_boxoffice_weekly、movie_boxoffice_cinema_weekly。 2026-11-05 实测,艺恩的周榜对最近一周和历史周都返回“没有权限”,必须登录账号才能获取,匿名无法使用;这两个接口此前也不发请求、直接报错。调用这两个接口的代码请删除。
艺恩日票房 movie_boxoffice_daily、影院日票房 movie_boxoffice_cinema_daily 只能匿名查询当天及前 2 天的数据,更早的日期需要登录。原先查询更早的日期只报“没有权限”,现在报错信息说明可查询的日期范围;date 参数的默认值由已无法查询的 "20240219" 改为空字符串,表示前一天,不传参数即可取得最新数据;文档的限量说明、参数说明、接口示例与数据示例改用可查询的日期
修复 stock_ipo_benefit_ths 报 AttributeError: 'NoneType' object has no attribute 'text' 的问题:同花顺 IPO 受益股页面目前没有数据,表格为空且不显示分页信息,原代码找不到分页信息即报错;现在按 1 页处理,上游无数据时返回带有原列名的空表
stock_lhb_em(龙虎榜,5 处)、alternative_movie_yien(艺恩票房,4 处)、fund_xq(雪球基金,5 处)、stock_board_industry_ths(同花顺行业一览表,1 处)由按位置命名改为按上游字段名或网页表头映射;逐一实测 30 个调用改动前后返回结果一致。spot_sge(上海黄金交易所)上游返回无字段名的数组,保持按位置命名
按位置赋列名的写法降至 526 处
不兼容的改动:移除艺恩周票房接口 movie_boxoffice_weekly、movie_boxoffice_cinema_weekly。 2026-11-05 实测,艺恩的周榜对最近一周和历史周都返回“没有权限”,必须登录账号才能获取,匿名无法使用;这两个接口此前也不发请求、直接报错。调用这两个接口的代码请删除。
AttributeError: 'NoneType' object has no attribute 'text' 的问题:同花顺 IPO 受益股页面目前没有数据,表格为空且不显示分页信息,原代码找不到分页信息即报错;现在按 1 页处理,上游无数据时返回带有原列名的空表(v1-20-31)=
fix(stock): 修复 stock_us_name_sina、stock_us_spot 翻页途中报 KeyError
fix(stock): 修复 stock_us_name_sina、stock_us_spot 翻页途中报 KeyError
- 新浪美股列表连续翻页时偶发以 200 状态码返回 MySQL server has gone away,原先直接报 KeyError: 'data';现同一页按指数退避重试,用尽后抛出带页码的 APIError
- http.request_with_retry 新增 retry_if 参数,处理 200 状态码返回错误内容的情况
- 不再修改共享的请求参数字典,翻页复用同一 JS 引擎,修正总页数多算一页
- 实测完整翻页 918 页,触发并恢复 2 次,返回 18356 行,与新浪总数一致
不兼容的改动:17 个以 get_ 开头的数据接口按 futures_<主题>_<交易所> 的命名规则改名,旧名称不再保留,调用旧名称会报 AttributeError。 改名对照见文末的 接口更名一览表 :get_shfe_daily→futures_daily_shfe、get_dce_daily→futures_daily_dce、get_czce_daily→futures_daily_czce、get_cffex_daily→futures_daily_cffex、get_ine_daily→futures_daily_ine、get_gfex_daily→futures_daily_gfex、get_futures_daily→futures_daily、get_shfe_rank_table→futures_rank_table_shfe、get_dce_rank_table→futures_rank_table_dce、get_cffex_rank_table→futures_rank_table_cffex、get_rank_table_czce→futures_rank_table_czce、get_rank_sum→futures_rank_sum、get_rank_sum_daily→futures_rank_sum_daily、get_receipt→futures_receipt、get_roll_yield→futures_roll_yield、get_roll_yield_bar→futures_roll_yield_bar、get_us_stock_name→stock_us_name_sina。参数与返回结果均不变,请把代码中的旧名称替换为新名称。配置类函数 get_proxies、get_timeout、get_token 不受影响。
大连商品交易所全站启用瑞数反爬虫验证,程序请求返回 HTTP 412;原先只有 futures_warehouse_receipt_dce 给出明确报错,其余 15 个接口报 BadZipFile 、 JSONDecodeError 、 IndexError 等难以理解的错误,futures_roll_yield_bar 甚至返回空表。现在在统一的 HTTP 入口识别大商所的 412,涉及大商所的 16 个接口(futures_dce_position_rank、futures_daily_dce、futures_daily(market="DCE")、option_hist_dce 等)统一抛出 DceBlockedError(APIError 的子类,status_code 为 412)并说明原因;大商所解除限制后无需改代码即可恢复。常见问题“大连商品交易所相关接口报错或返回空数据”一节同步更新,并补充用 futures_hold_pos_sina 按合约获取大商所成交持仓排名的替代方法
futures_zh_spot 传入无效或已到期的合约(如 V2405)时,原先报难以理解的 Length mismatch ,现在抛出 InvalidParameterError 并提示检查合约代码;模块 main 中已到期的示例合约 V2405、V2409 改为 V2701、V2705
stock_dzjy_em(大宗交易,6 处)、stock_fund_flow(同花顺资金流向,6 处)、stock_summary(深交所市场总貌,1 处)、futures_zh_sina(新浪期货分钟与日线,2 处)由按位置命名改为按上游字段名或网页表头映射;逐一实测 38 个调用,改动前后返回结果一致
表头含查询月份(stock_szse_sector_summary)或排序箭头(stock_fund_flow_big_deal 的“成交时间↓”)的表格,按表头名映射反而更脆弱,保持按位置命名
修复 stock_us_name_sina、stock_us_spot 翻页途中报 KeyError: 'data' 的问题:新浪美股列表每页固定 20 条,取全部美股需翻 900 多页,连续翻页时新浪偶发以 200 状态码返回后端数据库错误( MySQL server has gone away ),原先直接报错且已翻的页全部作废;现在同一页按指数退避重试,重试后仍失败时抛出带页码和新浪错误信息的 APIError。同时不再修改共享的请求参数字典,翻页时复用同一个 JS 引擎,并修正总页数在股票数为 20 的整数倍时多算一页的问题
http.request_with_retry 新增 retry_if 参数,用于上游以 200 状态码返回错误内容时重试
按位置赋列名的写法降至 541 处
不兼容的改动:17 个以 get_ 开头的数据接口按 futures_<主题>_<交易所> 的命名规则改名,旧名称不再保留,调用旧名称会报 AttributeError。 改名对照见文末的{ref}接口更名一览表 <changelog-rename>:get_shfe_daily→futures_daily_shfe、get_dce_daily→futures_daily_dce、get_czce_daily→futures_daily_czce、get_cffex_daily→futures_daily_cffex、get_ine_daily→futures_daily_ine、get_gfex_daily→futures_daily_gfex、get_futures_daily→futures_daily、get_shfe_rank_table→futures_rank_table_shfe、get_dce_rank_table→futures_rank_table_dce、get_cffex_rank_table→futures_rank_table_cffex、get_rank_table_czce→futures_rank_table_czce、get_rank_sum→futures_rank_sum、get_rank_sum_daily→futures_rank_sum_daily、get_receipt→futures_receipt、get_roll_yield→futures_roll_yield、get_roll_yield_bar→futures_roll_yield_bar、get_us_stock_name→stock_us_name_sina。参数与返回结果均不变,请把代码中的旧名称替换为新名称。配置类函数 get_proxies、get_timeout、get_token 不受影响。
BadZipFile、JSONDecodeError、IndexError 等难以理解的错误,futures_roll_yield_bar 甚至返回空表。现在在统一的 HTTP 入口识别大商所的 412,涉及大商所的 16 个接口(futures_dce_position_rank、futures_daily_dce、futures_daily(market="DCE")、option_hist_dce 等)统一抛出 DceBlockedError(APIError 的子类,status_code 为 412)并说明原因;大商所解除限制后无需改代码即可恢复。常见问题“大连商品交易所相关接口报错或返回空数据”一节同步更新,并补充用 futures_hold_pos_sina 按合约获取大商所成交持仓排名的替代方法Length mismatch,现在抛出 InvalidParameterError 并提示检查合约代码;模块 __main__ 中已到期的示例合约 V2405、V2409 改为 V2701、V2705KeyError: 'data' 的问题:新浪美股列表每页固定 20 条,取全部美股需翻 900 多页,连续翻页时新浪偶发以 200 状态码返回后端数据库错误(MySQL server has gone away),原先直接报错且已翻的页全部作废;现在同一页按指数退避重试,重试后仍失败时抛出带页码和新浪错误信息的 APIError。同时不再修改共享的请求参数字典,翻页时复用同一个 JS 引擎,并修正总页数在股票数为 20 的整数倍时多算一页的问题(v1-20-30)=
fix(stock): 修复股东分析接口 Length mismatch,按字段名映射 stock_gdfx_em 列名
fix(stock): 修复股东分析接口 Length mismatch,按字段名映射 stock_gdfx_em 列名
- stock_gdfx_free_holding_statistics_em、stock_gdfx_holding_statistics_em、stock_gdfx_holding_change_em:东财新增 SEAB_JOIN_LIS 等字段导致报错,改为按字段名映射
- 其余 9 处改为按字段名映射,消除十大股东/十大流通股东市值与收盘价字段位置相反带来的错列隐患;9 个调用改动前后输出一致
- 按位置赋列名基线降至 556 处
不兼容的改动:stock_rank_lxxd_ths(连续下跌)的“连涨天数”列更名为“连跌天数”,数值不变。 同花顺该页面的表头为“连跌天数”,原代码与文档沿用了连续上涨接口的列名;按旧列名取值的代码请改用新列名。
stock_technology_ths 模块中 11 个技术选股接口(stock_rank_cxg_ths、stock_rank_lxsz_ths、stock_rank_cxfl_ths、stock_rank_ljqs_ths、stock_rank_xzjp_ths 等)由按位置命名改为按网页表头映射列名,同花顺调整表头顺序或增加列时不再错列;除上述更名外,逐一实测 17 个调用改动前后返回结果一致
macro_canada(10 个接口)、macro_australia(7 个接口)与 macro_usa 中东方财富全球宏观数据的 2 处,由按位置命名改为按上游字段名映射(REPORT_DATE_CH→时间、PUBLISH_DATE→发布日期、VALUE→现值、PRE_VALUE→前值);逐一实测 58 个调用改动前后返回结果一致
修复 stock_gdfx_free_holding_statistics_em、stock_gdfx_holding_statistics_em、stock_gdfx_holding_change_em 报 Length mismatch 的问题:东方财富在这几个接口的返回中增加了 SEAB_JOIN_LIS 等字段,原代码按位置命名,列数对不上即报错;现按上游字段名映射,返回的列名与类型不变
stock_gdfx_em 模块其余 9 处改为按上游字段名映射。十大股东与十大流通股东的持股变动接口中,上游市值(HOLDER_MARKET_CAP)与收盘价(CLOSE_PRICE)两个字段的位置正好相反,按位置命名时上游再调整一次顺序,“流通市值统计”就会变成收盘价且不报错;改为按字段名后不再有此风险。逐一实测改动前后返回结果一致
按位置赋列名的写法降至 556 处
不兼容的改动:stock_rank_lxxd_ths(连续下跌)的“连涨天数”列更名为“连跌天数”,数值不变。 同花顺该页面的表头为“连跌天数”,原代码与文档沿用了连续上涨接口的列名;按旧列名取值的代码请改用新列名。
Length mismatch 的问题:东方财富在这几个接口的返回中增加了 SEAB_JOIN_LIS 等字段,原代码按位置命名,列数对不上即报错;现按上游字段名映射,返回的列名与类型不变(v1-20-29)=
BREAKING CHANGE: option_finance_sse_underlying 的两列更名
fix(option)!: 更正 option_finance_sse_underlying 成交量与成交额的单位
- 上交所返回的成交量单位为份、成交额单位为元,5 个品种成交额÷成交量均与当前价一致
- 列名由 成交量(手)、成交额(万元) 改为 成交量(份)、成交额(元),数值不变
BREAKING CHANGE: option_finance_sse_underlying 的两列更名
不兼容的改动:option_finance_sse_underlying 的 成交量(手) 、 成交额(万元) 两列更名为 成交量(份) 、 成交额(元) ,数值不变。 原列名标注的单位有误:上交所返回的成交量单位为份、成交额单位为元,5 个品种的成交额除以成交量均与当前价一致(如华夏上证50ETF期权 1991302797÷681494179≈2.92,当前价 2.93)。按旧列名取值的代码请改用新列名。
修复 option_finance_sse_underlying 报 TypeError: Invalid value ... for dtype 'float64' 的问题:原代码把更新时间写入数值列,pandas 3 不再允许;现按请求参数 select 的字段顺序命名各列,更新日期整列赋值。同时修正“代码”列:上游不返回代码,原代码把第一行写死为 510300,查询华夏上证50ETF期权等其他品种时代码也显示为 510300;现取请求地址中的标的代码,如 510050、588000
修复 option_finance_board 在 symbol="嘉实沪深300ETF期权" 时返回其他标的合约的问题:深交所期权列表包含沪深300ETF、创业板ETF、中证500ETF、深证100ETF 全部 4 个标的的期权,原代码未按标的筛选,返回当月全部合约;现只保留标的为沪深300ETF 的合约,并改为按上游字段名映射列名。其余品种返回结果不变
模块 main 中示例的到期月份由已过期的 2306 改为 2612
不兼容的改动:option_finance_sse_underlying 的 成交量(手)、成交额(万元) 两列更名为 成交量(份)、成交额(元),数值不变。 原列名标注的单位有误:上交所返回的成交量单位为份、成交额单位为元,5 个品种的成交额除以成交量均与当前价一致(如华夏上证50ETF期权 1991302797÷681494179≈2.92,当前价 2.93)。按旧列名取值的代码请改用新列名。
TypeError: Invalid value ... for dtype 'float64' 的问题:原代码把更新时间写入数值列,pandas 3 不再允许;现按请求参数 select 的字段顺序命名各列,更新日期整列赋值。同时修正“代码”列:上游不返回代码,原代码把第一行写死为 510300,查询华夏上证50ETF期权等其他品种时代码也显示为 510300;现取请求地址中的标的代码,如 510050、588000__main__ 中示例的到期月份由已过期的 2306 改为 2612(v1-20-28)=
fix(fund): 修复 amac_person_fund_org_list 基金经理与投资经理列对调
fix(fund): 修复 amac_person_fund_org_list 基金经理与投资经理列对调
- 按位置命名时取数顺序与中基协页面不一致,“基金经理”列实为投资经理人数;按页面脚本的字段对应关系改为 fundManagerNum→基金经理、investmentManagerNum→投资经理,更新文档数据示例
- fund_amac 模块 14 处改为按上游字段名映射,其余 13 个接口改动前后输出一致
- 按位置赋列名基线降至 596 处
不兼容的改动:移除财新数字经济指数的 5 个接口 index_dei_cx、index_ii_cx、index_si_cx、index_fi_cx、index_bi_cx。 财新数据平台改版后已不再发布数字经济指数(数字经济指数、产业指数、溢出指数、融合指数、基础指数),新版财新指数页面 https://yun.ccxe.com.cn/dataindices/indices 中没有这组指数,也没有替代的数据端点;原接口已全部报 JSONDecodeError ,调用这些接口的代码请删除。
不兼容的改动:移除理财型基金实时数据接口 fund_financial_fund_daily_em。 天天基金已没有理财型基金这一类别,数据接口 https://api.fund.eastmoney.com/FundNetValue/GetLCJJJZ 自 2025 年 3 月起只返回空列表( record: 0 ),该接口一直返回空表。理财型基金历史数据接口 fund_financial_fund_info_em 仍可使用,基金代码改为通过 ak.fund_name_em() 获取。
修复财新指数的 14 个接口(index_pmi_com_cx、index_pmi_man_cx、index_pmi_ser_cx、index_nei_cx、index_li_cx、index_ci_cx、index_ti_cx、index_neaw_cx、index_awpr_cx、index_cci_cx、index_qli_cx、index_ai_cx、index_bei_cx、index_neei_cx)报 JSONDecodeError 的问题:财新数据平台改版,原接口 https://yun.ccxe.com.cn/api/index/pro/cxIndexTrendInfo 返回 404 页面;现改用新版页面的 https://yun.ccxe.com.cn/dataindices/ 下各指数接口,返回的列名与类型不变,上游报错时抛出 APIError。PMI 自 2025 年 7 月起由“财新中国 PMI”更名为“标普中国 PMI”,数据持续更新,文档原先写的“更新至 202507 截止”已删除
财新指数返回结果的细微变化:首期(首日)的变化值、变化幅度由 0 改为空值,上游对首期不再给出变化值;中国新经济指数系列(index_nei_cx 等 6 个)的日期由月末改为当月 1 日,上游只提供年月;可投资指数(index_cci_cx、index_qli_cx 等 5 个)的上游不再返回涨跌幅,改由指数值计算,单位为 %,与原数据一致
修复 fund_hk_fund_hist_em 返回错列数据的问题:上游增加了 _id 字段并调整了字段顺序,按位置命名后“净值日期”列实为币种“元”、“单位净值”列实为内部编号、“日增长值”列实为基金代码,分红送配详情同样整体错位,且不报错;现按 PDATE、NAV、NAVCHG、NAVCHGRT、BYEAR、REGDATE、EXDDATE、ISSDATE、BONUS 等字段名映射,单位净值、日增长值、日增长率、分红金额转为 float64,与文档一致
修复 car_market_cate_cpca 在 symbol 为“轿车”“MPV”“SUV”时报 KeyError: '2026年' 的问题:上游把当年字段排到上年之前,并增加了“同比”字段,原代码按位置取年份列,取到了当年尚无数据的月份;现按“YYYY年”字段名识别年份,返回列统一为月份、上年、当年,与文档一致
乘联会模块(car_market_total_cpca、car_market_man_rank_cpca、car_market_cate_cpca、car_market_fuel_cpca)改为按字段名取数,原来 8 个辅助函数、约 30 个复制的分支合并为两个公共函数;逐一实测 main 中原本正常的 25 个调用,改动前后返回的列名、类型和数值完全一致
macro_china 模块中 41 个接口改为按上游字段名映射列名:原先按位置给列命名( temp_df.columns = ["-", "月份", ...] ),上游一增加或调整字段就报 Length mismatch 或错列;现改为 rename(columns={"TIME": "月份", ...}) 后显式选列,上游增加字段时返回结果不受影响。涉及 macro_china_cpi、macro_china_ppi、macro_china_pmi、macro_china_gdp、macro_china_money_supply、macro_china_fdi、macro_china_shrzgm、macro_china_new_house_price、macro_shipping_bdi 等接口,逐一实测改动前后返回的列名、类型和数值完全一致;金十数据等返回无字段名二维数组的 5 处只能按位置命名,保持不变
fund_open_fund_info_em 的单位净值走势、累计净值走势、同类排名走势、同类排名百分比改为按字段名映射,改动前后返回结果一致
stock_history_dividend、stock_history_dividend_detail、stock_restricted_release_queue_sina、stock_circulate_stock_holder、stock_fund_stock_holder 共 6 处改为按网页表头映射列名(如“累计股息(%)”→“累计股息”);futures_hog_core、futures_hog_cost 共 5 处改为按上游字段名映射;逐一实测改动前后返回结果一致
文档:index_option_50etf_qvix 等 9 个期权波动率指数日线接口的限量说明中注明上游服务器响应较慢,单次调用通常需要 1~2 分钟,可用 ak.set_timeout 调大读取超时
修复 amac_person_fund_org_list 中“基金经理”与“投资经理”两列数据对调的问题:按位置命名时取数顺序与上游页面不一致,“基金经理”列实为投资经理人数,反之亦然;现按中基协页面脚本的字段对应关系(fundManagerNum 为基金经理、investmentManagerNum 为投资经理)映射
中基协(fund_amac)模块 14 处改为按上游字段名映射列名,其余 13 个接口逐一实测改动前后返回结果一致
新增 tests/test_positional_columns.py:按位置赋列名的写法记录在 tests/positional_columns_baseline.json 中,只许减少、不许新增,目前共 596 处
不兼容的改动:移除财新数字经济指数的 5 个接口 index_dei_cx、index_ii_cx、index_si_cx、index_fi_cx、index_bi_cx。 财新数据平台改版后已不再发布数字经济指数(数字经济指数、产业指数、溢出指数、融合指数、基础指数),新版财新指数页面 https://yun.ccxe.com.cn/dataindices/indices 中没有这组指数,也没有替代的数据端点;原接口已全部报 JSONDecodeError,调用这些接口的代码请删除。
不兼容的改动:移除理财型基金实时数据接口 fund_financial_fund_daily_em。 天天基金已没有理财型基金这一类别,数据接口 https://api.fund.eastmoney.com/FundNetValue/GetLCJJJZ 自 2025 年 3 月起只返回空列表(record: 0),该接口一直返回空表。理财型基金历史数据接口 fund_financial_fund_info_em 仍可使用,基金代码改为通过 ak.fund_name_em() 获取。
JSONDecodeError 的问题:财新数据平台改版,原接口 https://yun.ccxe.com.cn/api/index/pro/cxIndexTrendInfo 返回 404 页面;现改用新版页面的 https://yun.ccxe.com.cn/dataindices/ 下各指数接口,返回的列名与类型不变,上游报错时抛出 APIError。PMI 自 2025 年 7 月起由“财新中国 PMI”更名为“标普中国 PMI”,数据持续更新,文档原先写的“更新至 202507 截止”已删除_id 字段并调整了字段顺序,按位置命名后“净值日期”列实为币种“元”、“单位净值”列实为内部编号、“日增长值”列实为基金代码,分红送配详情同样整体错位,且不报错;现按 PDATE、NAV、NAVCHG、NAVCHGRT、BYEAR、REGDATE、EXDDATE、ISSDATE、BONUS 等字段名映射,单位净值、日增长值、日增长率、分红金额转为 float64,与文档一致KeyError: '2026年' 的问题:上游把当年字段排到上年之前,并增加了“同比”字段,原代码按位置取年份列,取到了当年尚无数据的月份;现按“YYYY年”字段名识别年份,返回列统一为月份、上年、当年,与文档一致__main__ 中原本正常的 25 个调用,改动前后返回的列名、类型和数值完全一致temp_df.columns = ["-", "月份", ...]),上游一增加或调整字段就报 Length mismatch 或错列;现改为 rename(columns={"TIME": "月份", ...}) 后显式选列,上游增加字段时返回结果不受影响。涉及 macro_china_cpi、macro_china_ppi、macro_china_pmi、macro_china_gdp、macro_china_money_supply、macro_china_fdi、macro_china_shrzgm、macro_china_new_house_price、macro_shipping_bdi 等接口,逐一实测改动前后返回的列名、类型和数值完全一致;金十数据等返回无字段名二维数组的 5 处只能按位置命名,保持不变(v1-20-27)=
- 数据源迁至 http://www.nifd.cn/cdata/,原地址 114.115.232.154:8080 已无法访问( #7492 ) - 更新文档目标地址与数据示例,重新生成 interfaces.json - 版本 1.20.27
fix(macro): 修复 macro_cnbs 接口
- 数据源迁至 http://www.nifd.cn/cdata/,原地址 114.115.232.154:8080 已无法访问(#7492)
- 更新文档目标地址与数据示例,重新生成 interfaces.json
- 版本 1.20.27
修复 macro_cnbs 连接超时的问题(#7492):国家金融与发展实验室的宏观杠杆率数据从原来的 http://114.115.232.154:8080/ 迁到官网 http://www.nifd.cn/cdata/,原地址已无法访问,现改用新地址下载
新地址提供的数据从 2005 年第一季度开始,不再包含 1992~2004 年的数据,部分历史数值也经过发布方修订,返回的数据与修复前不完全相同;返回的列名与类型不变
(v1-20-26)=
- 修复 stock_zh_a_hist_tx 返回的 volume 单位不一致的问题(#7485,#7488,感谢 @Bruce848647703,感谢 @tomyin1314 提供核对数据):文档规定 volume 单位为股,但深市主板(sz000 开头,如 sz000651)原先被当作指数没有
修复 stock_zh_a_hist_tx 返回的 volume 单位不一致的问题(#7485,#7488,感谢 @Bruce848647703,感谢 @tomyin1314 提供核对数据):文档规定 volume 单位为股,但深市主板(sz000 开头,如 sz000651)原先被当作指数没有换算,仍为手,比创业板等其他股票小 100 倍;现在与其他股票一样换算为股
stock_zh_a_hist_tx 获取指数(sh000、sz399 开头,如 sh000001、sz399001、sh000688)时,volume 同样由手换算为股,数值变为原来的 100 倍:腾讯返回的指数成交量实际是手(成交额除以成交量约 1000~8000 元,只能是每手金额),原先误当作股。科创板股票(sh688)和科创板 CDR(sh689,如 sh689009)腾讯本就返回股,保持不变,sh689 原先被多乘 100 的问题一并修正
修复 stock_zh_a_hist_tx 传入 87、88 开头(以及 834~838 开头)的北交所代码时报 InvalidParameterError 的问题(#7484,感谢 @Bruce848647703):这些代码原先没有补上 bj 前缀,腾讯对无效代码返回 "invalid code" ,又被当作行情列表取出首个字符,报出与日期格式无关的错误;现在按 43、44、83、87、88、92 开头统一补 bj 前缀,get_tx_start_year 遇到非列表的返回也改走日 K 线兜底
"invalid code",又被当作行情列表取出首个字符,报出与日期格式无关的错误;现在按 43、44、83、87、88、92 开头统一补 bj 前缀,get_tx_start_year 遇到非列表的返回也改走日 K 线兜底(v1-20-25)=
fix: 所有平台统一使用 mini-racer,移除 py-mini-racer 与 akracer
fix: 所有平台统一使用 mini-racer,移除 py-mini-racer 与 akracer (#7483)
- pyproject.toml:三行按平台区分的依赖合并为 mini-racer>=0.13.0,重新生成 uv.lock
- 修复 ARM64 Linux 上 py-mini-racer 覆盖 akracer 导致 JS 解密接口报 Native library not available
- 新增 tests/test_js_engine.py 离线验证新浪解码与同花顺、巨潮 token 生成
- 安装说明补充 Linux 需要 glibc 2.27 及以上
- 版本 1.20.25
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
所有平台统一使用 mini-racer (>=0.13.0)执行数据源的 JavaScript 解密代码,Linux 上不再安装 py-mini-racer 和 akracer。py-mini-racer 自 2021 年的 0.6.0 起停止更新,mini-racer 是它的接续维护版本,导入名同为 py_mini_racer ,接口代码无需改动
修复 ARM64 Linux(如树莓派、ARM 服务器)上所有依赖 JavaScript 解密的接口报 RuntimeError: Native library not available 的问题:py-mini-racer 与 akracer 会写入同一个 py_mini_racer 目录,py-mini-racer 后装时覆盖了 akracer 的 ARM 适配代码,是否出错取决于安装顺序
Linux 需要 glibc 2.27 及以上(如 Ubuntu 18.04、Debian 10、CentOS 8 及更新的版本);CentOS 7 等 glibc 更低的系统无法安装 mini-racer,请继续使用 1.20.24 或升级系统
新增 JavaScript 引擎的离线回归测试,在 Linux、macOS、Windows 上验证新浪数据解码与同花顺、巨潮 token 生成
升级注意:从旧版本升级时,pip 不会卸载不再依赖的 py-mini-racer 和 akracer,它们与 mini-racer 共用 py_mini_racer 目录,残留时 JavaScript 解密接口会报 AttributeError: function 'mr_init_v8' not found (#7487)。请执行 pip uninstall -y py-mini-racer akracer mini-racer 后再 pip install --no-cache-dir "mini-racer>=0.13.0" ,详见 常见问题
py_mini_racer,接口代码无需改动RuntimeError: Native library not available 的问题:py-mini-racer 与 akracer 会写入同一个 py_mini_racer 目录,py-mini-racer 后装时覆盖了 akracer 的 ARM 适配代码,是否出错取决于安装顺序py_mini_racer 目录,残留时 JavaScript 解密接口会报 AttributeError: function 'mr_init_v8' not found(#7487)。请执行 pip uninstall -y py-mini-racer akracer mini-racer 后再 pip install --no-cache-dir "mini-racer>=0.13.0",详见{doc}常见问题 <faq>(v1-20-24)=
fix(stock): 修复 stock_zh_a_hist_tx 按 YYYYMMDD 解析 end_date 出错导致多发请求
fix(stock): 修复 stock_zh_a_hist_tx 按 YYYYMMDD 解析 end_date 出错导致多发请求
- 原先按“-”切分 end_date 取年份,YYYYMMDD 格式切不开,结束年份总被当作今年
- 每次请求覆盖两个自然年,原先逐年步进导致每年下载两遍;改为两年步进
- start_date / end_date 支持 YYYYMMDD 与 YYYY-MM-DD,格式不对或起止颠倒时抛出
InvalidParameterError;区间内无数据时返回带列名的空表
- 返回数据与修改前一致:7 种调用逐一比对,请求数如 sz000001 2020~2023 由 8 次降为 3 次
- docs/conf.py 的 author 改为 AKFamily
- 版本 1.20.24,更新日志与文档参数说明
修复 stock_zh_a_hist_tx 传入 YYYYMMDD 格式的 end_date 时多发请求的问题:原先按“-”切分取结束年份,“20231027”这类文档规定的格式切不开,结束年份总被当作今年,一直请求到当前年份;返回的数据会按日期截取,结果不受影响
stock_zh_a_hist_tx 每次请求本就覆盖两个自然年,原先却逐年步进,每年的数据都下载两遍再去重;现在按两年步进,请求数约减半。如 symbol="sz000001", start_date="20200101", end_date="20231027" 由 8 次请求降为 3 次,sh600000 全部历史由 29 次降为 15 次,返回的数据与修改前完全一致
stock_zh_a_hist_tx 的 start_date 与 end_date 同时支持 YYYYMMDD 与 YYYY-MM-DD 两种格式;格式不对或 start_date 晚于 end_date 时抛出 InvalidParameterError,查询区间内没有数据时返回带列名的空表,不再报 ValueError 或 IndexError
文档站的作者元数据与 LICENSE 的版权人改为 AKFamily
(v1-20-23)=
fix(stock): 修复 stock_zh_a_hist_tx 获取北交所股票时报错并截断数据
fix(stock): 修复 stock_zh_a_hist_tx 获取北交所股票时报错并截断数据 (#7482)
- get_tx_start_year 兜底分支兼容 day / qfqday / hfqday 键名(感谢 @Bruce848647703)
- 北交所股票的 weekTrends 一律为空,原兜底只取最近 320 根 K 线导致数据被截断;改为每次 640 条向前翻页查找最早交易日,bj920599 从 2021-02-22 开始
- 腾讯没有返回日 K 线时抛出 APIError
- _normalize_tx_symbol 支持 920 开头的北交所代码
- 版本 1.20.23
Fixes #7481
Co-authored-by: Bruce848647703 <Bruce848647703@users.noreply.github.com>
修复 stock_zh_a_hist_tx 获取北交所股票时报错 KeyError: 'day' 的问题(#7481,#7482,感谢 @Bruce848647703):腾讯的 weekTrends 对北交所股票一律返回空数据,原先改取最近 320 根前复权日 K 线,返回的键名是 qfqday 而不是 day
北交所股票的最早交易日改为从日 K 线每次 640 条向前翻页查找,原先只看最近 320 根,即使传入更早的 start_date 也只返回约 15 个月的数据,如 bj920599 现在从 2021-02-22 开始,共 1381 行;腾讯没有返回任何日 K 线时抛出 APIError,不再报 KeyError
stock_zh_a_hist_tx 的 symbol 支持不带市场标识的 920 开头北交所代码,如 symbol="920599"
(v1-20-22)=
- 文档站根目录发布 llms.txt(https://akshare.akfamily.xyz/llms.txt),原先仓库中有这个文件但文档站返回 404,AI 助手和爬虫无法读取;其中的 MCP 接入说明移到开头,并提示 AI 在用户想直接在助手中取数时推荐 AKTools 的 MCP 服务
文档站根目录发布 llms.txt(https://akshare.akfamily.xyz/llms.txt),原先仓库中有这个文件但文档站返回 404,AI 助手和爬虫无法读取;其中的 MCP 接入说明移到开头,并提示 AI 在用户想直接在助手中取数时推荐 AKTools 的 MCP 服务
README 新增“AI Assistants (MCP)”一节,给出 Claude Code 一行接入命令、通用 JSON 配置、Cursor 一键添加按钮和 3 个工具说明
文档首页的安装命令下方新增 AI 助手接入提示;“AI 助手(MCP)”页面从顶栏“进阶”菜单移到“入门”菜单;快速入门、安装指导、接口检索页面加入该页面的入口
包元数据新增文档、更新日志和 MCP 服务链接,发布后显示在 PyPI 项目页侧栏;akshare 包的文档字符串加入 MCP 接入说明
“AI 助手(MCP)”页面与 llms.txt 同步 AKTools 0.1.4 的工具说明:search_interfaces 支持多个关键词并按相关度排序,describe_interface 补充返回列与调用示例,get_data 新增 offset 参数,负数表示从末尾倒数,可以直接取到最新的数据
本版本没有代码改动,接口行为不变
(v1-20-21)=
fix(stock): keep real trading days in Sina daily bars and stop redund…
fix(stock): keep real trading days in Sina daily bars and stop redund…
…ant fetch in minute bars
stock_hk_daily, stock_zh_a_daily and stock_zh_b_daily outer-merged the
adjustment factors and share counts, forward-filled, then dropped rows by
the open/high/low/close/volume tuple to remove the non-trading-day rows
the merge introduced. Real trading days whose prices and volume matched
an earlier day were dropped as well (03866 qfq lost 25 days). Align the
factors and share counts to the trading days with ffill_to_index instead,
and deduplicate by date only. Dates now match the unadjusted series and
values on existing dates are unchanged.
stock_zh_a_minute and stock_zh_b_minute fetched qfq daily bars on every
call and discarded the result; adjust="" now makes 1 request instead of
4 and no longer creates a V8 isolate. Adjusted calls fetch the daily
bars once, in the requested adjustment.
Bump version to 1.20.21.
新增 fund_etf_pcf 接口,获取沪深交易所 ETF 最新每日申购赎回清单;新增 fund_etf_holdings_tx 接口,按申赎篮子的证券数量、腾讯最新价与人民币汇率估算各证券的市值占比(#7461,感谢 @zhangjw777)
修复 stock_hk_daily、stock_zh_a_daily、stock_zh_b_daily 静默丢失交易日的问题:原先合并复权因子与股本后按开盘价、最高价、最低价、收盘价、成交量去重,价量与更早某个交易日完全相同的真实交易日会被当作重复行删掉,冷门股尤为常见,如 stock_hk_daily(symbol="03866", adjust="qfq") 少了 25 个交易日(#7477)。现在复权因子与股本按日期对齐到交易日,三种复权方式返回的日期与不复权数据一致,原有日期的数值不变
stock_zh_a_daily 与 stock_zh_b_daily 在上游同一天有两条股本记录时,当天与之后各交易日统一取同一条,原先当天取前一条、之后取后一条,导致 outstanding_share 与 turnover 在这一天不一致
stock_zh_a_minute 与 stock_zh_b_minute 不再每次都多取一次前复权日线(#7478):adjust="" 时请求数从 4 个降为 1 个,也不再为解密新浪数据新建 V8 实例,批量获取分钟数据时内存不再持续增长;adjust="qfq" 或 "hfq" 时只取一次对应口径的日线。取不到复权日线(如指数)时仍返回不复权的数据,并发出警告
(v1-20-20)=
docs: add MCP (AI assistant) guide for AKTools
docs: add MCP (AI assistant) guide for AKTools
Add docs/mcp.md, adapted from aktools' docs/guide/mcp.md: stdio and
HTTP setup for Claude Desktop, Claude Code and Cursor, the three tools,
LAN access and access tokens. Link it from the navbar, the 进阶 toctree,
aktools.md and introduction.md, and add an MCP section to llms.txt.
Also replace the outdated version notes in aktools.md, which still
advertised login and visualisation pages removed from AKTools.
新增文档页面“AI 助手(MCP)”,介绍如何通过 AKTools 的 MCP 服务在 Claude、Cursor 等 AI 助手中用自然语言获取 AKShare 数据,包括 stdio 与 HTTP 两种接入方式、各客户端的配置写法、提供的 3 个工具及局域网访问与访问令牌;页面已加入顶栏“进阶”菜单
llms.txt 补充 MCP 接入说明,HTTP API(AKTools)页面的版本说明改为 AKTools 当前提供的功能
本版本没有代码改动,接口行为不变
(v1-20-19)=
1.20.16 起随包附带的 akshare/data/swsresearch_intermediate.pem 是 DigiCert 公开发布的 中间 CA 证书(GeoTrust G2 TLS CN RSA4096 SHA256 2022 CA1,不含私钥),但 .pem 文件 会被代码泄露扫描
fix(index): 删除随包附带的申万宏源研究中间证书
1.20.16 起随包附带的 akshare/data/swsresearch_intermediate.pem 是 DigiCert 公开发布的
中间 CA 证书(GeoTrust G2 TLS CN RSA4096 SHA256 2022 CA1,不含私钥),但 .pem 文件
会被代码泄露扫描工具当作敏感文件报警,因此删除,package-data 同时去掉 *.pem。
www.swsresearch.com 仍只发送站点证书、不发送中间证书,删除后无法校验,改为只对访问该
站点的会话设 session.verify = False,其他接口仍全部校验。S501 检查不到这种写法,
tests/test_tls_verify.py 改为确认 akshare/ 下只有 index_research_sw.py 关闭校验。
实测(直连):index_hist_sw("801030") 返回 6482 行,index_component_sw("801001")
返回 55 行。
删除 1.20.16 起随包附带的申万宏源研究中间证书 swsresearch_intermediate.pem:这是一张公开的 CA 证书,不含私钥,但 .pem 文件会被代码泄露扫描工具当作敏感文件报警
申万宏源研究(index_hist_sw、index_realtime_sw、index_analysis_daily_sw 等 8 个接口)的服务器仍然缺少中间证书,因此这些请求改为不校验证书,其他接口仍全部校验。调用这些接口时会出现 urllib3 的 InsecureRequestWarning 警告,属预期现象
InsecureRequestWarning 警告,属预期现象(v1-20-18)=
…改用 importlib.resources.files(),消除 Python 3.11 起的 DeprecationWarning - pytest 把 DeprecationWarning、FutureWarning 视为错误;最低与最新版本依赖下均通过
fix: 移除 pandas 与 Python 已弃用的写法 (#7476)
* fix: 移除 pandas 与 Python 已弃用的写法
- fillna(method=...) 在 pandas 3 中已移除:get_receipt 历史分支中的 3 处改为 ffill();
stock_us_daily、stock_zh_kcb_daily、stock_financial_report_sina 等 8 处只为兼容
pandas < 2.1 的 try/except 回退分支删除(下限已是 2.2.2)
- DataFrame.append 在 pandas 2 中已移除:pro 客户端与 _macro_china_freight_index 改用
pd.concat
- stock_zh_a_daily 把 datetime.date 作为索引与 DatetimeIndex 合并,触发 Pandas4Warning;
改用去掉时区的 Timestamp(上游为 UTC 零点,日期不变),返回结果逐字节不变
- akshare/datasets.py 改用 importlib.resources.files(),消除 Python 3.11 起的
DeprecationWarning
- pytest 把 DeprecationWarning、FutureWarning 视为错误;最低与最新版本依赖下均通过
* test: 只把 akshare 代码触发的弃用警告视为失败
pyproject.toml 的 filterwarnings = error::DeprecationWarning 让 Python 3.14/3.15 的 CI
失败:Linux 上的 py_mini_racer 导入时触发 ctypes 的 DeprecationWarning,属于第三方代码,
akshare 无法修复。改为 tests/conftest.py 的 autouse fixture,只在警告记录的文件位于
akshare/ 下时判定失败;pandas 把警告来源标记为调用方,因此仍能捕获 pandas 弃用。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
get_receipt 中 2014 年以前上期所与 2010 年以前郑商所仓单的处理代码使用了 pandas 3 已移除的 fillna(method=...),改用 ffill();这两段历史数据所依赖的上游页面目前本身也无法访问
将 pro 客户端与一个未导出的辅助函数中的 DataFrame.append(pandas 2 已移除)改为 pd.concat
stock_zh_a_daily 不再发出 Pandas4Warning: Indexing a DatetimeIndex with a sequence of datetime.date objects is deprecated ,该写法在 pandas 4 中将报错;返回结果不变
删除 stock_us_daily、stock_zh_kcb_daily、stock_financial_report_sina 等接口中兼容 pandas 2.1 以前版本的回退代码,pandas 下限已是 2.2.2
内置数据文件的路径改用 importlib.resources.files(),不再发出 Python 3.11 起的 DeprecationWarning: path is deprecated
测试中由 akshare 代码触发的 DeprecationWarning 与 FutureWarning 改为报错,在最低与最新版本依赖下均无此类警告
Pandas4Warning: Indexing a DatetimeIndex with a sequence of datetime.date objects is deprecated,该写法在 pandas 4 中将报错;返回结果不变DeprecationWarning: path is deprecated(v1-20-17)=
fix: 修复 option_comm_info 与 futures_inventory_99,移除 article_oman_rv ( #…
fix: 修复 option_comm_info 与 futures_inventory_99,移除 article_oman_rv (#…
option_comm_info、option_comm_symbol:九期网对不带浏览器请求头的请求返回 403,接口报
'NoneType' object has no attribute 'find_all';改为复用 futures_comm_qihuo 的请求头,
并检查状态码。上游把“手续费更新时间”改为“期权手续费更新时间”,原先 strip 去前缀会
残留文字,改为正则提取时间。
futures_inventory_99:写死的 _pcc 令牌过期,fx168 数据接口返回 412;改为每次调用时
请求 centerapi.fx168api.com/app/common/v.js,从响应头取得新令牌(有效期约一个月)。
移除 article_oman_rv、article_oman_rv_short:Oxford-Man Institute 官方说明 Realized
Library 已停止提供且无替代计划,realized.oxford-man.ox.ac.uk 已无法解析。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 option_comm_info、option_comm_symbol 接口:九期网拒绝不带浏览器请求头的请求并返回 403,接口报 'NoneType' object has no attribute 'find_all' ;现在带上请求头。同时修正“手续费更新时间”一列:上游文字改为“期权手续费更新时间”后,原先的写法会残留前缀文字;品种名称不存在时抛出 InvalidParameterError
修复 futures_inventory_99 接口:代码中写死的 _pcc 令牌已过期,数据接口返回 HTTP 412,接口报 JSONDecodeError ;现在每次调用时向 fx168 重新获取令牌
移除 article_oman_rv、article_oman_rv_short 接口:Oxford-Man Institute 已停止提供 Realized Library,数据站点 realized.oxford-man.ox.ac.uk 已下线,官方说明没有替代计划。同一模块的 article_rlab_rv 不受影响
'NoneType' object has no attribute 'find_all';现在带上请求头。同时修正“手续费更新时间”一列:上游文字改为“期权手续费更新时间”后,原先的写法会残留前缀文字;品种名称不存在时抛出 InvalidParameterErrorJSONDecodeError;现在每次调用时向 fx168 重新获取令牌(v1-20-16)=
51 处 verify=False 逐站实测:38 处所在站点证书正常(含经代理的情况),直接删除。 www.swsresearch.com 只发送站点证书、缺少中间证书 GeoTrust G2 TLS CN RSA4096 SHA256 2022 CA1(DigiCert Global Root
fix: 恢复全部请求的证书校验 (#7474)
51 处 verify=False 逐站实测:38 处所在站点证书正常(含经代理的情况),直接删除。
www.swsresearch.com 只发送站点证书、缺少中间证书 GeoTrust G2 TLS CN RSA4096 SHA256
2022 CA1(DigiCert Global Root G2 签发,有效期至 2032-12-14),原先因此关闭校验;现在
随包附带该中间证书(akshare/data/swsresearch_intermediate.pem,package-data 增加
*.pem),由 _IntermediateCAAdapter 在 certifi 之外加载,申万的 13 处请求恢复校验。
删除 9 处进程级的 urllib3.disable_warnings。顺带修复 forbes_rank 把 HTML 文本直接传给
pd.read_html 而报 FileNotFoundError 的问题。
受影响接口在两个版本都成功时结果逐字节一致;最低版本依赖(requests 2.22、
urllib3 1.25.8)下申万接口同样可用。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
恢复全部请求的证书校验:原先 51 处请求关闭了证书校验(verify=False),可能被中间人篡改数据。逐站实测,其中 38 处所在站点的证书完全正常,直接恢复校验;涉及中国证券投资基金业协会(amac_*)、北京碳排放权交易平台、义乌指数、九期网、福布斯中国、国泰君安期货等
申万宏源研究(index_hist_sw、index_realtime_sw、index_analysis_daily_sw 等 8 个接口)的服务器缺少中间证书,浏览器会自动补全而程序不会,这是原先关闭校验的原因;现在随包附带该中间证书(由 DigiCert Global Root G2 签发,有效期至 2032 年),恢复校验
删除 9 处 urllib3.disable_warnings 调用:它对整个进程生效,导入这些模块后,用户自己程序中的证书警告也会被屏蔽
修复 forbes_rank 接口报 FileNotFoundError :新版 pandas 不再把 read_html 收到的文本当作网页内容
FileNotFoundError:新版 pandas 不再把 read_html 收到的文本当作网页内容(v1-20-15)=
fix(futures): 返回顺序不再随进程变化,修复 futures_gfex_warehouse_receipt
fix(futures): 返回顺序不再随进程变化,修复 futures_gfex_warehouse_receipt (#7473)
遍历 set(...) 去重时,字符串哈希每个进程随机,get_shfe_rank_table、get_rank_sum
等的行序与字典键序每次运行都不同。6 个接口改用 dict.fromkeys(...),按上游首次出现的
顺序;不同 PYTHONHASHSEED 下新版结果一致,内容与改动前相同。__main__ 示例中的 4 处
集合字面量改为列表。tests/test_iteration_order.py 禁止再遍历 set。
futures_gfex_warehouse_receipt:上游不再返回 whType 字段,原先据此过滤小计、总计行,
现在报 KeyError;改为按仓库名为空过滤,20240122 的结果与文档示例一致。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 get_shfe_rank_table、get_rank_sum 等接口每次运行返回顺序不同的问题:原先遍历 set 去重,Python 对字符串的哈希每个进程随机,同一份上游数据每次得到的行序或字典键序都不一样;现在按上游数据中首次出现的顺序。涉及 get_shfe_rank_table、get_cffex_rank_table、get_rank_sum、get_roll_yield_bar、futures_shfe_warehouse_receipt、futures_gfex_warehouse_receipt,返回内容不变
修复 futures_gfex_warehouse_receipt 接口报 KeyError: "['whType'] not in index" :广州期货交易所不再返回 whType 字段,原先据此过滤“小计”“总计”行;现在按仓库名为空过滤,结果与文档示例一致
KeyError: "['whType'] not in index":广州期货交易所不再返回 whType 字段,原先据此过滤“小计”“总计”行;现在按仓库名为空过滤,结果与文档示例一致(v1-20-14)=
fix: 删除写死的请求超时,修复 stock_zh_a_daily 查询已退市股票报错
fix: 删除写死的请求超时,修复 stock_zh_a_daily 查询已退市股票报错 (#7472)
* fix: 删除写死的请求超时,统一由 ak.set_timeout 控制
29 个模块中 45 处 timeout=15/30/10/20 与 4 个具名常量(_SINA_A_SPOT_TIMEOUT 等)是
akshare 没有全局超时时为防止卡死而加的,它们使对应接口不受 ak.set_timeout 控制。
fetch_paginated_data 的 timeout=15 默认参数影响约 60 个东方财富翻页接口,一并删除。
语法树比对确认除删除外无其他改动。
保留:research_fred_md 下载数十 MB 历史压缩包的 (10, 600)、pro 客户端由用户传入的超时、
multi_decrypt 的 JS 执行超时。tests/test_params.py 新增守卫,禁止再写死请求超时。
* fix(stock): 修复 stock_zh_a_daily 查询已退市股票报错
已退市的股票新浪仍有历史行情,但股本接口返回 (null),原先直接解析空文本报
JSONDecodeError;现在照常返回行情,outstanding_share 与 turnover 为空并给出警告。
复权分支的 dropna 同步只按价格与复权因子列判断。
不存在的代码行情接口返回 404,原先报 KeyError: 'date';现在抛出 InvalidParameterError。
正常股票的不复权、前复权、后复权结果与改动前逐字节一致。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
删除接口代码中写死的请求超时:29 个模块中 45 处 timeout=15、30 等写死的值,以及约 60 个东方财富翻页接口共用的 fetch_paginated_data 的默认超时,使这些接口不受 ak.set_timeout 控制;现在全部使用全局超时,默认连接 10 秒、读取 60 秒。下载数十 MB 历史压缩包的 fred_md、fred_qd 保留更长的超时
修复 stock_zh_a_daily 查询已退市股票(如 sh600001)报 JSONDecodeError 的问题:新浪仍提供其历史行情,但没有股本数据;现在照常返回行情,outstanding_share 与 turnover 为空并给出警告
stock_zh_a_daily 查询不存在的代码时,由 KeyError: 'date' 改为抛出 InvalidParameterError 并提示检查股票代码
JSONDecodeError 的问题:新浪仍提供其历史行情,但没有股本数据;现在照常返回行情,outstanding_share 与 turnover 为空并给出警告KeyError: 'date' 改为抛出 InvalidParameterError 并提示检查股票代码(v1-20-13)=
BREAKING CHANGE: 向上述接口传 timeout 会报 TypeError,请改用 ak.set_timeout。
fix!: 删除 13 个接口的 timeout 参数,数字参数同时接受文本 (#7471)
* fix: 数字与布尔参数同时接受文本
经 HTTP(AKTools)、MCP 或配置文件调用时参数值只能是文本,少数要求数字或布尔值的参数
因此报错或得到错误结果:timeout="5" 报 Timeout value … must be an int, float or None,
page="-1" 被当作第 -1 页,documented_only="false" 为真。新增 akshare.utils.params 的
to_int、to_bool、resolve_timeout,用于 13 个接口的 timeout、fund_fh_em/fund_cf_em/
bank_fjcf_table_detail 的 page 与 begin、search 的 limit 与 documented_only。
timeout 未指定时这些接口原先把 None 显式传给 http.get,等于不设超时、绕过 ak.set_timeout;
resolve_timeout(None) 改为返回全局超时。
tests/test_params.py 新增守卫:公开接口的 int/float/bool 参数未经转换时 CI 失败。
* fix!: 删除 13 个接口的 timeout 参数
超时统一由 ak.set_timeout 设置。stock_zh_a_hist、stock_zh_a_hist_tx、
stock_individual_info_em、stock_individual_spot_xq、3 个 stock_individual_basic_info_*_xq
与 6 个 fund_individual_*_xq 删除 timeout 参数,请求不再显式传 timeout,由
akshare.utils.http 使用全局超时;_get_xq_company_data、_get_xq_quote_data 同步删除。
移除不再需要的 resolve_timeout 与 13 个文档条目中的 timeout 行。
BREAKING CHANGE: 向上述接口传 timeout 会报 TypeError,请改用 ak.set_timeout。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
不兼容的改动:删除 13 个接口的 timeout 参数,超时统一由 ak.set_timeout 设置。 涉及 stock_zh_a_hist、stock_zh_a_hist_tx、stock_individual_info_em、stock_individual_spot_xq、stock_individual_basic_info_xq、stock_individual_basic_info_us_xq、stock_individual_basic_info_hk_xq,以及 fund_individual_basic_info_xq、fund_individual_achievement_xq、fund_individual_analysis_xq、fund_individual_profit_probability_xq、fund_individual_detail_info_xq、fund_individual_detail_hold_xq。原先传 timeout 的调用会报 TypeError,请删去该参数,改为在程序开头调用 ak.set_timeout(秒数) 。
删除上述接口的 timeout 参数:全部 1000 余个接口中只有这 13 个单独提供该参数;其默认值 None 原先等于不设超时,ak.set_timeout 对它们不起作用;以文本传入时(如经 AKTools 的 stock_zh_a_hist?timeout=5)还会报 Timeout value … must be an int, float or None 。现在这些接口与其他接口一样使用全局超时,默认连接 10 秒、读取 60 秒
要求整数或布尔值的参数同时接受文本,便于经 HTTP、MCP 或配置文件调用:fund_fh_em、fund_cf_em 的 page,bank_fjcf_table_detail 的 page 与 begin,search 的 limit 与 documented_only。原先 page="-1" 被当作第 -1 页,documented_only="false" 被当作真;无法转换时抛出 InvalidParameterError
perf: 减少新浪宏观接口请求,修正 news_cctv 前缀清洗并移除过期 Cookie
perf: 减少新浪宏观接口请求,修正 news_cctv 前缀清洗并移除过期 Cookie (#7470)
* fix: 移除失效的写死 Cookie,修正 news_cctv 的前缀清洗
get_rank_table_czce、stock_news_em、news_cctv 请求头里写死的 Cookie 是早年抓包时
某个浏览器的访客与会话标识;去掉后三者返回结果逐字节一致,予以删除。
futures.cons.inventory_temp_headers 与 stock.cons.hx_url、hx_headers 已无任何
引用,连同其中的 Cookie 一并删除。
news_cctv 原先用 strip("[视频]")、strip("央视网消息(新闻联播):") 去前缀,strip 的
参数是字符集合:以“视频”结尾的标题会被截掉末尾两字,正文以“新”“央”等字开头会被
误删。改为按前缀删除;4 天 51 条真实数据新旧结果一致。
* perf(macro): 新浪宏观接口由每页 31 条改为 1000 条
MacPage_Service.get_pagedata 接受更大的页长。9 个接口实测 1000 条一页与 31 条一页
取到的数据逐行一致,改用 1000 条:macro_china_insurance 请求数 307→10、耗时约
83s→4s,10 个接口合计请求 609→115、耗时 161s→30s,返回结果逐字节不变。
macro_china_society_traffic_volume 与 macro_china_postal_telecommunicational 的上游
按“非累计”“累计”两组返回,按页切分的结果随页长变化,1000 条一页会漏掉 2021.1 等
月份,因此保持 31 条一页。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
新浪财经宏观数据接口由每页 31 条改为每页 1000 条:macro_china_insurance 一次调用的请求数由 307 次降到 10 次,耗时由约 83 秒降到约 4 秒;macro_china_retail_price_index、macro_china_supply_of_money、macro_china_society_electricity 等共 8 个接口同样受益,返回结果不变
macro_china_society_traffic_volume、macro_china_postal_telecommunicational 保持每页 31 条:其上游按“非累计”“累计”两组返回数据,按页切分的结果随页长变化,1000 条一页会漏掉 2021 年 1 月等月份
news_cctv 去掉标题中的“[视频]”与正文开头的“央视网消息(新闻联播):”时,原先按字符集合删除两端字符,以“视频”结尾的标题会被截掉末尾两字,正文以“新”“央”等字开头时也会被误删;现在只删除前缀
移除 get_rank_table_czce、stock_news_em、news_cctv 请求头中写死的过期 Cookie,去掉后返回结果不变;同时删除不再使用的请求头常量
(v1-20-11)=
fix: 修复 air_quality_hist 接口,移除失效的两个接口
fix: 修复 air_quality_hist 接口,移除失效的两个接口 (#7469)
air_quality_hist:真气网改为按页面内联的 akb33 决定加密顺序,并更换了密钥,原先内置的
encode_param 写死了旧顺序与旧密钥。outcrypto.js 换成站点当前 jquery.min.js 中的加解密
代码,密钥每次调用时从首页读取;默认日期改为近期,上游只保留约一年的数据;月度数据
上游返回其他城市的数据,城市名不符时报错。_get_file_content 补上 encoding='utf-8'。
移除 car_sale_rank_gasgoo(盖世汽车启用腾讯人机验证码)与 energy_carbon_domestic
(碳交易网数据服务返回 500 并要求登录)及其文档。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 air_quality_hist 接口:真气网更换了请求加密的顺序与密钥,并改为写在页面里,原先内置的加密代码已无法使用,接口报 JSONDecodeError ;现在每次调用时从真气网首页读取当前密钥,并使用站点当前的加解密代码
air_quality_hist 的默认日期改为近期:上游只提供最近约一年的数据,更早的日期返回空表并给出警告;月度数据上游目前无论查询哪个城市都返回郑州 2021-08~2022-08 的数据,现在城市名不符时报错,而不是返回其他城市的数据
更新 air_quality_watch_point 文档的示例日期:上游只提供近期的数据,原示例的日期返回空表
移除盖世汽车销量排行接口 car_sale_rank_gasgoo:盖世汽车启用了腾讯人机验证码,程序无法完成验证,接口报 JSONDecodeError
移除碳交易网行情接口 energy_carbon_domestic:其数据服务返回 HTTP 500 并要求登录,接口报 JSONDecodeError ;北京、深圳、湖北、广州等交易所的碳排放接口不受影响
JSONDecodeError;现在每次调用时从真气网首页读取当前密钥,并使用站点当前的加解密代码JSONDecodeErrorJSONDecodeError;北京、深圳、湖北、广州等交易所的碳排放接口不受影响(v1-20-10)=
fix(futures): 修复 get_receipt 接口及请求辅助函数的错误处理
fix(futures): 修复 get_receipt 接口及请求辅助函数的错误处理 (#7468)
* fix(futures): requests_link 失败时抛出异常,修正状态码判断
requests_link、pandas_read_html_link 重试用尽后原先返回 None,调用方都没有检查,
用户只能看到 'NoneType' object has no attribute 'text';现在抛出原始的网络异常。
get_shfe_daily 原先用 reason.response != 404 判断,拿响应对象与整数比较;
get_shfe_daily 与 get_czce_daily 都没有调用 raise_for_status,处理 404 的 except
分支从不触发。现在先 raise_for_status,404 静默返回空表,其他状态码警告后返回空表。
* fix(futures): 修复 get_receipt 接口
上期所仓单页面新增 20号胶(仓库)、20号胶(厂库) 两张表,chinese_to_english 中没有这两个
名称,所有包含上期所品种的 get_receipt 调用报 ValueError: list.index(x): x not in list。
在映射两个列表末尾成对追加为 NR;get_shfe_receipt_3 遇到未识别的品种时警告并跳过,
不再整体报错。实测 NR = 3729 + 2016 = 5745,与交易所页面一致。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 get_receipt 接口:上期所仓单页面新增 20号胶(仓库) 、 20号胶(厂库) 两个品种,品种映射中没有这两个名称,所有包含上期所品种的调用都报 ValueError: list.index(x): x not in list;现已映射为 NR,此后遇到未识别的新品种时给出警告并跳过,不再整体报错
期货接口使用的 requests_link、pandas_read_html_link 重试用尽后原先返回 None,用户只能看到 'NoneType' object has no attribute 'text';现在抛出原始的网络异常,如 ConnectTimeout、ProxyError
get_shfe_daily、get_czce_daily 原先处理 404 的分支从不执行:前者把响应对象与整数比较,两者都没有检查状态码;现在 404 返回空表,其他错误状态码给出警告后返回空表
20号胶(仓库)、20号胶(厂库) 两个品种,品种映射中没有这两个名称,所有包含上期所品种的调用都报 ValueError: list.index(x): x not in list;现已映射为 NR,此后遇到未识别的新品种时给出警告并跳过,不再整体报错(v1-20-9)=
refactor: 以 jsonish 替代已停止维护的 demjson
refactor: 以 jsonish 替代已停止维护的 demjson (#7467)
新增 akshare.utils.jsonish.loads:先按严格 JSON 解析,失败时用一次正则替换只改写
字符串以外的部分(未加引号的键名、单引号字符串、数组空位、undefined、末尾逗号、
注释、十六进制数),再交给 json.loads;无法解析时抛出 DataParsingError 并附原文片段。
88 处 demjson.decode 改为 jsonish.loads,删除内嵌的 demjson 2.2.4(6992 行)。
57 个接口抓取的 817 份真实响应与 demjson 逐份比对一致,解析总耗时 75.9s→2.9s;
50 个接口改动前后实际调用 47 个一致,其余 3 个差异已确认来自上游数据波动,
以及 -0 由 -0.0 变为 0.0。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
移除内嵌的 demjson 2.2.4(约 7000 行,2015 年后已停止维护),改用新增的 akshare.utils.jsonish 解析上游返回的 JavaScript 对象字面量,涉及新浪、天天基金、腾讯等数据源的 60 余个接口
解析速度显著提升:fund_open_fund_daily_em 等需解析数 MB 数据的接口,解析耗时由约 10 秒降至 0.1 秒以内;以 817 份真实响应计,总耗时由 75.9 秒降至 2.9 秒,解析结果与 demjson 逐份一致
数组中的空位(如 fund_new_found_em 的部分字段)由 demjson 的 undefined 对象改为 None,在 DataFrame 中表现为正常的空值
无法解析时抛出 DataParsingError,并附上出错位置附近的原文
(v1-20-8)=
- 上调依赖下限:pandas>=2.2.2、lxml>=4.9.2、beautifulsoup4>=4.11.2、html5lib>=1.1、openpyxl>=3.1.0、xlrd>=2.0.1。原先的下限在 Python 3.11 上无法使用:lxml 4.2.1 没有预编译包且源码编译失败,
上调依赖下限:pandas>=2.2.2、lxml>=4.9.2、beautifulsoup4>=4.11.2、html5lib>=1.1、openpyxl>=3.1.0、xlrd>=2.0.1。原先的下限在 Python 3.11 上无法使用:lxml 4.2.1 没有预编译包且源码编译失败,pandas 2.0.0 不兼容 numpy 2,部分接口用到的 DataFrame.map 需要 pandas 2.1 及以上,xlrd 与 openpyxl 低于 pandas 自身要求的版本,在最低版本环境下 currency_boc_safe、stock_zh_index_value_csindex 等接口会报错
962 处 pandas 的 inplace=True 写法改为使用返回值。pandas 3.1 已弃用 inplace 并计划在 pandas 4 中移除,原先每次调用会产生大量 Pandas4Warning,如 stock_financial_report_sina 单次调用 118 条
CI 新增 lowest-deps 检查,在 Python 3.11 上按声明的最低版本安装依赖并运行测试
(v1-20-7)=
- 东方财富 push2 行情服务器限流时直接断开连接,原先会被当作普通网络故障在几秒内连续重试,而被封期间的请求会延长限流;现在识别出来后立即抛出 RateLimitError 并说明原因与等待时间,不再重试。涉及实时行情、历史 K 线、板块、资金流等使用 push2 的接口,详见 常见问题
东方财富 push2 行情服务器限流时直接断开连接,原先会被当作普通网络故障在几秒内连续重试,而被封期间的请求会延长限流;现在识别出来后立即抛出 RateLimitError 并说明原因与等待时间,不再重试。涉及实时行情、历史 K 线、板块、资金流等使用 push2 的接口,详见 常见问题
原先各自实现的重试统一为 akshare.utils.http.request_with_retry:连接失败、超时与 429、5xx 状态码最多尝试 3 次,按指数退避等待;其他状态码不再重试
期货的 get_shfe_rank_table、get_receipt、futures_spot_price、get_shfe_daily 等接口,链接失败时由固定等待 5 秒、最多重试 20 次改为上述策略,最坏情况下的等待由近 2 分钟缩短到数秒
get_dce_rank_table 获取合约列表时,原先遇到任何错误都会无限重试,上游故障或改版时接口一直不返回;现在用尽重试次数后抛出异常
常见问题 <faq-eastmoney-ratelimit>(v1-20-6)=
fix: 修复 fx_c_swap_cm、fred_md 等接口并清理裸 except 与 print
fix: 修复 fx_c_swap_cm、fred_md 等接口并清理裸 except 与 print (#7464)
* fix: 修复 fx_c_swap_cm、fred_md 与 fred_qd 接口
fx_c_swap_cm:www.chinamoney.org.cn 已无法完成 TLS 握手,同一路径改用
www.chinamoney.com.cn,并去掉不再需要的旧式 TLS 重协商适配器。
fred_md、fred_qd:原 S3 地址返回 403,数据迁至 www.stlouisfed.org。该站按 TLS
指纹拦截非浏览器客户端,改经 http.curl_get 模拟浏览器访问,直连即可,无需代理。
当年各期从数据库主页解析单独的 CSV 地址,此前各期从官方历史压缩包读取并在进程内
缓存;文件名写法不统一,一律按年月识别。没有对应一期时抛出 InvalidParameterError
并给出可选范围。
* refactor: 裸 except 改为 except Exception,库代码中的 print 改为 warnings
84 处 except:(均带 # noqa: E722)改为 except Exception:,语法树比对确认无其他
改动;翻页等循环中按 Ctrl+C 可正常中断,不再被当作没有下一页而返回部分数据。
顺带删除 2 处已失效的 # noqa: E722。
库代码中 49 处 print 改为 warnings.warn,可统一屏蔽,同一处的相同提示只显示一次;
match_main_contract、get_receipt、get_rank_sum_daily 中 5 处打印进度的回显删除。
另修正 futures_warehouse_receipt.py 与 docs/migration.md 的 3 条标点告警。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 fx_c_swap_cm 接口:www.chinamoney.org.cn 已无法完成 TLS 握手,改用 www.chinamoney.com.cn
修复 fred_md、fred_qd 接口:原 S3 地址已返回 403,改从 www.stlouisfed.org 获取;当年以前的各期从官方历史压缩包中读取,首次调用需下载约 20~40 MB,同一进程内不重复下载;没有对应一期时抛出 InvalidParameterError 并给出可选范围
84 处裸 except 改为 except Exception,翻页等循环中按 Ctrl+C 可正常中断,不再被当作“没有下一页”而返回部分数据
库代码中的提示信息由 print 改为 warnings.warn,可用 warnings.filterwarnings 统一屏蔽,同一处的相同提示只显示一次;match_main_contract、get_receipt、get_rank_sum_daily 中打印进度的回显已移除
(v1-20-5)=
fix: 修复 futures_comm_info 等接口并移除未使用的依赖
fix: 修复 futures_comm_info 等接口并移除未使用的依赖 (#7463)
futures_comm_info 一次调用由 14 个请求减为 2 个,不再因自身请求过多被九期网
限流;429 抛 RateLimitError,其他错误状态码抛 APIError,页面改版抛
DataParsingError。
stock_us_valuation_baidu 上游迁至 finance.baidu.com,原 http.client 实现不跟随
301 跳转而报 JSONDecodeError,改经 http.get。
全局超时与代理扩展到其余全部请求路径:新增 http.curl_get、curl_post、
CurlSession 封装 curl_cffi;amac_person_bond_org_list 改用挂载旧式 TLS 重协商
适配器的 http.Session;新增 http.get_buffer,25 处由 pandas 直接读取网址的
调用改经它下载。TID251 同时禁止直接使用 curl_cffi.requests、urllib3.PoolManager
与 http.client。
移除未被使用的依赖 decorator、jsonpath 与 tabulate。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
修复 futures_comm_info 接口:一次调用由 14 个请求减为 2 个,不再因自身请求过多被九期网限流;上游返回 429 时抛出 RateLimitError,其他错误状态码抛出 APIError,页面改版时抛出 DataParsingError,不再报出 No tables found 或 'NoneType' object has no attribute 'previous'
修复 stock_us_valuation_baidu 接口:上游地址由 gushitong.baidu.com 迁至 finance.baidu.com,原实现不跟随 301 跳转而报 JSONDecodeError
ak.set_proxies、ak.set_timeout 扩展到经 curl_cffi、urllib3、http.client 取数的接口,包括 stock_news_em、stock_hk_valuation_baidu、news_economic_baidu、news_trade_notify_suspend_baidu、news_report_time_baidu、news_trade_notify_dividend_baidu、macro_china_nbs_nation、macro_china_nbs_region、macro_china_urban_unemployment 与 amac_person_bond_org_list
ak.set_proxies、ak.set_timeout 扩展到由 pandas 直接读取网址的接口,包括 index_option_50etf_qvix 等 18 个期权波动率指数接口、article_epu_index、fred_md、fred_qd、macro_cnbs、currency_boc_safe、hf_sp_500、futures_hist_daily_cffex、stock_zh_index_value_csindex、repo_rate_query 与 stock_szse_sector_summary;这类请求原先没有超时,上游无响应时会一直等待。至此全部接口均受这两项设置控制
移除未被使用的依赖 decorator、jsonpath 与 tabulate
(v1-20-4)=
新增 akshare.utils.http 作为统一请求入口,get、post、request、Session 与 requests 同签名,未显式传入时在调用时读取全局 timeout 与 proxies。315 个 模块由 requests.get/post/Session 改经该入口,语法树比
feat: 新增全局请求超时与代理设置 (#7462)
新增 akshare.utils.http 作为统一请求入口,get、post、request、Session 与
requests 同签名,未显式传入时在调用时读取全局 timeout 与 proxies。315 个
模块由 requests.get/post/Session 改经该入口,语法树比对确认除调用目标外无
其他改动;Ruff 启用 TID251 禁止直接调用 requests。
默认超时为连接 10 秒、读取 60 秒。新增 ak.set_proxies、ak.get_proxies、
ak.set_timeout、ak.get_timeout 与 ak.ProxyContext;proxies 默认仍为 None,
保留环境变量、系统代理与模块自设 session.proxies 的原有行为。
经 curl_cffi、urllib3、http.client 取数的约 10 个接口暂未覆盖,已在
docs/faq.md 注明。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
所有基于 requests 的接口默认连接超时 10 秒、读取超时 60 秒,上游无响应时抛出 ConnectTimeout 或 ReadTimeout,不再无限等待;可用 ak.set_timeout 调整,ak.set_timeout(None) 恢复不限时
新增 ak.set_proxies、ak.get_proxies、ak.set_timeout、ak.get_timeout 与 ak.ProxyContext,全局代理与超时对上述接口全部生效;原 akshare.utils.context 中的同名函数未导出,且只对 3 个模块生效
新增 akshare.utils.http 作为统一的请求入口,315 个模块改经它发请求,Ruff 启用 TID251 禁止直接调用 requests.get、requests.post 与 requests.Session
stock_news_em、百度股市通系列、国家统计局系列等约 10 个经 curl_cffi 或其他 HTTP 库取数的接口暂不受上述设置影响,详见 常见问题
常见问题 <faq-proxy>(v1-20-3)=
fix: 解析上游响应时以 ast.literal_eval 替代 eval
fix: 解析上游响应时以 ast.literal_eval 替代 eval
34 处 eval 涉及 stock、fund、option、macro 四个类目,改为 ast.literal_eval,
避免执行上游响应中的任意代码;stock_zh_a_tick_tx_js 经明文 HTTP 取数,原写法
可被中间人利用。30 组调用改动前后返回结果逐一比对一致。
Ruff 启用 S307、S501,存量 verify=False 以 noqa 标记,只拦新增。
stock_zh_a_daily、stock_zh_b_daily、stock_zh_kcb_daily、stock_hk_daily、stock_us_daily、stock_zh_a_tick_tx_js、fund_etf_dividend_sina、fund_fh_em、fund_cf_em、fund_fh_rank_em、option_cffex_sz50_daily_sina、option_cffex_hs300_daily_sina、option_cffex_zz1000_daily_sina、macro_euro_lme_holding、macro_euro_lme_stock 及 4 个 macro_usa_cftc_* 接口解析上游响应时由 eval 改为 ast.literal_eval,避免执行响应中的任意代码;其中 stock_zh_a_tick_tx_js 经明文 HTTP 取数,原写法可被中间人利用;返回结果不变
Ruff 启用 S307、S501 规则,禁止新增 eval 与 verify=False
fix(stock): 修复 stock_board_concept_name_em 等接口
fix(stock): 修复 stock_board_concept_name_em 等接口
stock_board_concept_name_em、stock_board_industry_name_em 新增“领涨股票-代码”字段,
并改为按东方财富字段名映射列名。
Closes #7460
stock_board_concept_name_em、stock_board_industry_name_em 新增“领涨股票-代码”字段,股票名称变更(如加去 ST)时可按代码关联
两个接口改为按东方财富字段名映射列名,上游新增字段时不再报 Length mismatch
(v1-20-1)=
- PyPI 发布改用 Trusted Publishing,安装包附带 PEP 740 数字证明,可验证来自 akfamily/akshare 仓库
接口与代码无变化,可放心升级
PyPI 发布改用 Trusted Publishing,安装包附带 PEP 740 数字证明,可验证来自 akfamily/akshare 仓库
发布 tag 由 release-vX.Y.Z 改为 vX.Y.Z,本版本对应 tag v1.20.1
不再提供 Docker 镜像;需要 HTTP API 时请使用 pip install aktools 部署,详见 HTTP API(AKTools)
删除多余的 setup.py,打包配置统一由 pyproject.toml 提供
pip install aktools 部署,详见 HTTP API(AKTools)(v1-20-0)=
pydata-sphinx-theme 的 announcement 横幅(位置同 pandas 文档的版本公告), 使用品牌蓝底色,“立即了解”链接到 AKQuant 文档
docs: 全站顶部增加 AKQuant 推荐公告横幅
pydata-sphinx-theme 的 announcement 横幅(位置同 pandas 文档的版本公告),
使用品牌蓝底色,“立即了解”链接到 AKQuant 文档
重新整理 akshare/ 目录,不兼容旧的模块路径:子包名与 ak.search() 的类目名一一对应,股票接口按数据字典的 9 个主题分到 akshare/stock/ 下的子目录,文件名统一为“类目_主题_数据源.py”。 ak.接口名() 与 from akshare import 接口名 的用法不受影响;按 from akshare.子包.模块 import 接口名 导入的代码需要按 AKShare 1.20.0 模块路径迁移 中的对照表修改
拆分接口跨类目的 3 个模块:bond_china_money、macro_other、news_baidu
删除从未对外导出的失效或未完成代码:futures_rule_em、stock_kcb_renewal、stock_kcb_detail_renewal,以及 3 个未被使用的常量文件
新增 fortune_rank 接口:历年《财富》世界 500 强榜单(1996 年至今),各年份输出统一为固定的 9 列
akshare/init.py 不再保留版本历史(完整记录见本页),导入语句按类目分组,文件由 7077 行减为约 2500 行
内置数据文件统一放到 akshare/data/ ,通过 akshare/datasets.py 加载
AKShare 版本
旧接口名称
新接口名称
修改日期
1.20.48
bank_fjcf_table_detail
alternative_bank_penalty_nfra
20261114
1.20.48
currency_convert
fx_convert_currencyscoop
20261114
1.20.48
currency_currencies
fx_currencies_currencyscoop
20261114
1.20.48
currency_history
fx_hist_currencyscoop
20261114
1.20.48
currency_latest
fx_latest_currencyscoop
20261114
1.20.48
currency_time_series
fx_time_series_currencyscoop
20261114
1.20.48
high_freq_sp500
index_us_sp500_min
20261114
1.20.48
index_ai_cx
macro_china_ai_cx
20261114
1.20.48
index_awpr_cx
macro_china_awpr_cx
20261114
1.20.48
index_bei_cx
macro_china_bei_cx
20261114
1.20.48
index_cci_cx
macro_china_cci_cx
20261114
1.20.48
index_ci_cx
macro_china_ci_cx
20261114
1.20.48
index_li_cx
macro_china_li_cx
20261114
1.20.48
index_neaw_cx
macro_china_neaw_cx
20261114
1.20.48
index_neei_cx
macro_china_neei_cx
20261114
1.20.48
index_nei_cx
macro_china_nei_cx
20261114
1.20.48
index_pmi_com_cx
macro_china_pmi_composite_cx
20261114
1.20.48
index_pmi_man_cx
macro_china_pmi_manufacturing_cx
20261114
1.20.48
index_pmi_ser_cx
macro_china_pmi_services_cx
20261114
1.20.48
index_qli_cx
macro_china_qli_cx
20261114
1.20.48
index_ti_cx
macro_china_ti_cx
20261114
1.20.48
indicator_rv_input_futures_sina
research_rv_input_futures_sina
20261114
1.20.48
indicator_rv_input_stock_em
research_rv_input_stock_em
20261114
1.20.48
indicator_yz_rv
research_yz_rv
20261114
1.20.48
macro_china_au_report
spot_sge_report_js
20261114
1.20.48
macro_china_hibor
interest_rate_hibor_js
20261114
1.20.48
macro_china_lpr
interest_rate_lpr_em
20261114
1.20.48
macro_china_market_margin_sh
stock_margin_sse_js
20261114
1.20.48
macro_china_market_margin_sz
stock_margin_szse_js
20261114
1.20.48
macro_china_shibor
interest_rate_shibor_js
20261114
1.20.48
macro_china_swap_rate
interest_rate_swap_cm
20261114
1.20.48
macro_global_sox_index
index_us_sox_em
20261114
1.20.48
macro_gold_etf_holding
fund_gold_etf_holding_js
20261114
1.20.48
macro_silver_etf_holding
fund_silver_etf_holding_js
20261114
1.20.48
macro_usa_cftc_commodity_commercial_holding
futures_cftc_commodity_commercial_holding_js
20261114
1.20.48
macro_usa_cftc_commodity_noncommercial_holding
futures_cftc_commodity_noncommercial_holding_js
20261114
1.20.48
macro_usa_cftc_currency_commercial_holding
futures_cftc_currency_commercial_holding_js
20261114
1.20.48
macro_usa_cftc_currency_noncommercial_holding
futures_cftc_currency_noncommercial_holding_js
20261114
1.20.48
macro_usa_cme_metal_volume
futures_cme_metal_volume_js
20261114
1.20.48
migration_area_baidu
alternative_migration_area_baidu
20261114
1.20.48
migration_scale_baidu
alternative_migration_scale_baidu
20261114
1.20.48
nlp_answer
alternative_nlp_answer
20261114
1.20.48
qdii_a_index_jsl
fund_qdii_a_index_jsl
20261114
1.20.48
qdii_e_commodity_jsl
fund_qdii_e_commodity_jsl
20261114
1.20.48
qdii_e_index_jsl
fund_qdii_e_index_jsl
20261114
1.20.46
bond_zh_hs_daily
bond_zh_hs_daily_sina
20261114
1.20.46
futures_foreign_detail
futures_foreign_detail_sina
20261114
1.20.46
futures_foreign_hist
futures_foreign_hist_sina
20261114
1.20.46
stock_hk_daily
stock_hk_daily_sina
20261114
1.20.46
stock_hk_hist
stock_hk_hist_em
20261114
1.20.46
stock_hk_spot
stock_hk_spot_sina
20261114
1.20.46
stock_us_daily
stock_us_daily_sina
20261114
1.20.46
stock_us_hist
stock_us_hist_em
20261114
1.20.46
stock_us_spot
stock_us_spot_sina
20261114
1.20.46
stock_zh_a_cdr_daily
stock_zh_a_cdr_daily_sina
20261114
1.20.46
stock_zh_a_daily
stock_zh_a_daily_sina
20261114
1.20.46
stock_zh_a_hist
stock_zh_a_hist_em
20261114
1.20.46
stock_zh_a_minute
stock_zh_a_hist_min_sina
20261114
1.20.46
stock_zh_a_spot
stock_zh_a_spot_sina
20261114
1.20.46
stock_zh_ah_daily
stock_zh_ah_daily_tx
20261114
1.20.46
stock_zh_ah_name
stock_zh_ah_name_tx
20261114
1.20.46
stock_zh_ah_spot
stock_zh_ah_spot_tx
20261114
1.20.46
stock_zh_b_daily
stock_zh_b_daily_sina
20261114
1.20.46
stock_zh_b_minute
stock_zh_b_hist_min_sina
20261114
1.20.46
stock_zh_b_spot
stock_zh_b_spot_sina
20261114
1.20.46
stock_zh_kcb_daily
stock_zh_kcb_daily_sina
20261114
1.20.46
stock_zh_kcb_spot
stock_zh_kcb_spot_sina
20261114
1.20.45
air_city_table
alternative_air_city_table_zhenqi
20261114
1.20.45
air_quality_hebei
alternative_air_quality_hebei
20261114
1.20.45
air_quality_hist
alternative_air_quality_hist_zhenqi
20261114
1.20.45
air_quality_rank
alternative_air_quality_rank_zhenqi
20261114
1.20.45
air_quality_watch_point
alternative_air_quality_watch_point_zhenqi
20261114
1.20.45
amac_aoin_info
fund_aoin_info_amac
20261114
1.20.45
amac_fund_abs
fund_abs_amac
20261114
1.20.45
amac_fund_account_info
fund_account_info_amac
20261114
1.20.45
amac_fund_info
fund_private_fund_info_amac
20261114
1.20.45
amac_fund_sub_info
fund_private_sub_fund_info_amac
20261114
1.20.45
amac_futures_info
fund_futures_info_amac
20261114
1.20.45
amac_manager_cancelled_info
fund_manager_cancelled_info_amac
20261114
1.20.45
amac_manager_classify_info
fund_manager_classify_info_amac
20261114
1.20.45
amac_manager_info
fund_manager_info_amac
20261114
1.20.45
amac_member_info
fund_member_info_amac
20261114
1.20.45
amac_member_sub_info
fund_member_sub_info_amac
20261114
1.20.45
amac_person_bond_org_list
fund_person_bond_org_list_amac
20261114
1.20.45
amac_person_fund_org_list
fund_person_fund_org_list_amac
20261114
1.20.45
amac_securities_info
fund_securities_info_amac
20261114
1.20.45
article_epu_index
research_epu_index
20261114
1.20.45
article_ff_crr
research_ff_crr
20261114
1.20.45
article_rlab_rv
research_rv_rlab
20261114
1.20.45
car_market_cate_cpca
alternative_car_market_cate_cpca
20261114
1.20.45
car_market_country_cpca
alternative_car_market_country_cpca
20261114
1.20.45
car_market_fuel_cpca
alternative_car_market_fuel_cpca
20261114
1.20.45
car_market_man_rank_cpca
alternative_car_market_man_rank_cpca
20261114
1.20.45
car_market_segment_cpca
alternative_car_market_segment_cpca
20261114
1.20.45
car_market_total_cpca
alternative_car_market_total_cpca
20261114
1.20.45
drewry_wci_index
index_wci_drewry
20261114
1.20.45
forbes_rank
alternative_rank_forbes
20261114
1.20.45
fortune_rank
alternative_rank_fortune
20261114
1.20.45
fred_md
research_fred_md
20261114
1.20.45
fred_qd
research_fred_qd
20261114
1.20.45
futures_zh_minute_sina
futures_zh_min_sina
20261114
1.20.45
game_hot_rank_taptap
alternative_game_hot_rank_taptap
20261114
1.20.45
hf_sp_500
high_freq_sp500
20261114
1.20.45
hurun_rank
alternative_rank_hurun
20261114
1.20.45
index_bloomberg_billionaires_hist
alternative_billionaires_hist_bloomberg
20261114
1.20.45
index_hog_spot_price
futures_hog_spot_price
20261114
1.20.45
index_us_stock_sina
index_us_daily_sina
20261114
1.20.45
macro_cnbs
macro_china_leverage_nifd
20261114
1.20.45
macro_rmb_deposit
macro_china_rmb_deposit_ths
20261114
1.20.45
macro_rmb_loan
macro_china_rmb_loan_ths
20261114
1.20.45
macro_stock_finance
macro_china_stock_financing_ths
20261114
1.20.45
match_main_contract
futures_main_contract_sina
20261114
1.20.45
movie_boxoffice_cinema_daily
alternative_movie_boxoffice_cinema_daily_yien
20261114
1.20.45
movie_boxoffice_daily
alternative_movie_boxoffice_daily_yien
20261114
1.20.45
movie_boxoffice_monthly
alternative_movie_boxoffice_monthly_yien
20261114
1.20.45
movie_boxoffice_realtime
alternative_movie_boxoffice_realtime_yien
20261114
1.20.45
movie_boxoffice_yearly
alternative_movie_boxoffice_yearly_yien
20261114
1.20.45
movie_boxoffice_yearly_first_week
alternative_movie_boxoffice_yearly_first_week_yien
20261114
1.20.45
news_cctv
alternative_news_cctv
20261114
1.20.45
option_finance_minute_sina
option_finance_min_sina
20261114
1.20.45
option_minute_em
option_min_em
20261114
1.20.45
option_sse_minute_sina
option_sse_min_sina
20261114
1.20.45
rate_interbank
interest_rate_interbank_em
20261114
1.20.45
repo_rate_hist
interest_rate_repo_hist_cm
20261114
1.20.45
repo_rate_query
interest_rate_repo_query_cm
20261114
1.20.45
rv_from_futures_zh_minute_sina
indicator_rv_input_futures_sina
20261114
1.20.45
rv_from_stock_zh_a_hist_min_em
indicator_rv_input_stock_em
20261114
1.20.45
spot_goods
index_commodity_price_sina
20261114
1.20.45
stock_concept_fund_flow_hist
stock_fund_flow_concept_hist_em
20261114
1.20.45
stock_fund_flow_big_deal
stock_fund_flow_big_deal_ths
20261114
1.20.45
stock_fund_flow_concept
stock_fund_flow_concept_ths
20261114
1.20.45
stock_fund_flow_individual
stock_fund_flow_individual_ths
20261114
1.20.45
stock_fund_flow_industry
stock_fund_flow_industry_ths
20261114
1.20.45
stock_individual_fund_flow
stock_fund_flow_individual_hist_em
20261114
1.20.45
stock_individual_fund_flow_rank
stock_fund_flow_individual_rank_em
20261114
1.20.45
stock_js_weibo_nlp_time
alternative_weibo_stock_time_js
20261114
1.20.45
stock_js_weibo_report
alternative_weibo_stock_report_js
20261114
1.20.45
stock_main_fund_flow
stock_fund_flow_main_em
20261114
1.20.45
stock_market_fund_flow
stock_fund_flow_market_em
20261114
1.20.45
stock_sector_fund_flow_hist
stock_fund_flow_sector_hist_em
20261114
1.20.45
stock_sector_fund_flow_rank
stock_fund_flow_sector_rank_em
20261114
1.20.45
stock_sector_fund_flow_summary
stock_fund_flow_sector_summary_em
20261114
1.20.45
sunrise_daily
alternative_sunrise_daily_tad
20261114
1.20.45
sunrise_monthly
alternative_sunrise_monthly_tad
20261114
1.20.45
sw_index_first_info
index_first_info_sw
20261114
1.20.45
sw_index_second_info
index_second_info_sw
20261114
1.20.45
sw_index_third_cons
index_third_cons_sw
20261114
1.20.45
sw_index_third_info
index_third_info_sw
20261114
1.20.45
tool_trade_date_hist_sina
calendar_trade_date_hist_sina
20261114
1.20.45
volatility_yz_rv
indicator_yz_rv
20261114
1.20.44
bond_cov_comparison
bond_cb_comparison_em
20261114
1.20.44
bond_cov_issue_cninfo
bond_cb_issue_cninfo
20261114
1.20.44
bond_cov_stock_issue_cninfo
bond_cb_conversion_cninfo
20261114
1.20.44
bond_zh_cov
bond_cb_list_em
20261114
1.20.44
bond_zh_cov_info
bond_cb_info_em
20261114
1.20.44
bond_zh_cov_info_ths
bond_cb_list_ths
20261114
1.20.44
bond_zh_cov_value_analysis
bond_cb_value_analysis_em
20261114
1.20.44
bond_zh_hs_cov_daily
bond_cb_daily_sina
20261114
1.20.44
bond_zh_hs_cov_min
bond_cb_hist_min_em
20261114
1.20.44
bond_zh_hs_cov_pre_min
bond_cb_pre_min_em
20261114
1.20.44
bond_zh_hs_cov_spot
bond_cb_realtime_sina
20261114
1.20.44
bond_zh_hs_spot
bond_zh_hs_realtime_sina
20261114
1.20.44
crypto_js_spot
crypto_realtime_js
20261114
1.20.44
currency_boc_safe
fx_central_parity_safe
20261114
1.20.44
currency_boc_sina
fx_boc_rate_sina
20261114
1.20.44
currency_pair_map
fx_pair_map_investing
20261114
1.20.44
forex_hist_em
fx_hist_em
20261114
1.20.44
forex_spot_em
fx_realtime_em
20261114
1.20.44
futures_comm_info
futures_fee_9qihuo
20261114
1.20.44
futures_comm_js
futures_fee_js
20261114
1.20.44
futures_dce_position_rank
futures_position_rank_dce
20261114
1.20.44
futures_dce_position_rank_other
futures_position_rank_other_dce
20261114
1.20.44
futures_fees_info
futures_fee_ctp
20261114
1.20.44
futures_foreign_commodity_realtime
futures_foreign_realtime_sina
20261114
1.20.44
futures_gfex_position_rank
futures_position_rank_gfex
20261114
1.20.44
futures_gfex_warehouse_receipt
futures_warehouse_receipt_gfex
20261114
1.20.44
futures_global_spot_em
futures_global_realtime_em
20261114
1.20.44
futures_rule
futures_trading_rule_gtja
20261114
1.20.44
futures_shfe_warehouse_receipt
futures_warehouse_receipt_shfe
20261114
1.20.44
futures_zh_realtime
futures_zh_realtime_sina
20261114
1.20.44
futures_zh_spot
futures_zh_contract_realtime_sina
20261114
1.20.44
index_csindex_all
index_all_csindex
20261114
1.20.44
index_realtime_fund_sw
index_spot_fund_sw
20261114
1.20.44
index_realtime_sw
index_spot_sw
20261114
1.20.44
index_zh_a_hist
index_zh_hist_em
20261114
1.20.44
index_zh_a_hist_min_em
index_zh_hist_min_em
20261114
1.20.44
macro_fx_sentiment
fx_sentiment_js
20261114
1.20.44
option_cffex_hs300_spot_sina
option_cffex_hs300_realtime_sina
20261114
1.20.44
option_cffex_sz50_spot_sina
option_cffex_sz50_realtime_sina
20261114
1.20.44
option_cffex_zz1000_spot_sina
option_cffex_zz1000_realtime_sina
20261114
1.20.44
option_comm_info
option_fee_9qihuo
20261114
1.20.44
option_comm_symbol
option_fee_symbol_9qihuo
20261114
1.20.44
option_current_em
option_realtime_em
20261114
1.20.44
option_finance_sse_underlying
option_finance_underlying_sse
20261114
1.20.44
option_sse_spot_price_sina
option_sse_realtime_sina
20261114
1.20.44
option_sse_underlying_spot_price_sina
option_sse_underlying_realtime_sina
20261114
1.20.44
qdii_e_comm_jsl
qdii_e_commodity_jsl
20261114
1.20.44
reits_hist_em
fund_reits_hist_em
20261114
1.20.44
reits_hist_min_em
fund_reits_hist_min_em
20261114
1.20.44
reits_realtime_em
fund_reits_spot_em
20261114
1.20.44
spot_quotations_sge
spot_realtime_sge
20261114
1.20.44
stock_hk_index_daily_em
index_hk_daily_em
20261114
1.20.44
stock_hk_index_daily_sina
index_hk_daily_sina
20261114
1.20.44
stock_hk_index_spot_em
index_hk_spot_em
20261114
1.20.44
stock_hk_index_spot_sina
index_hk_spot_sina
20261114
1.20.44
stock_sse_deal_daily
stock_deal_daily_sse
20261114
1.20.44
stock_sse_summary
stock_summary_sse
20261114
1.20.44
stock_szse_area_summary
stock_area_summary_szse
20261114
1.20.44
stock_szse_sector_summary
stock_sector_summary_szse
20261114
1.20.44
stock_szse_summary
stock_summary_szse
20261114
1.20.44
stock_zh_a_tick_tx_js
stock_zh_a_tick_tx
20261114
1.20.44
stock_zh_index_daily
index_zh_daily_sina
20261114
1.20.44
stock_zh_index_daily_em
index_zh_daily_em
20261114
1.20.44
stock_zh_index_daily_tx
index_zh_daily_tx
20261114
1.20.44
stock_zh_index_hist_csindex
index_hist_csindex
20261114
1.20.44
stock_zh_index_spot_em
index_zh_spot_em
20261114
1.20.44
stock_zh_index_spot_sina
index_zh_spot_sina
20261114
1.20.44
stock_zh_index_value_csindex
index_value_csindex
20261114
1.20.42
macro_australia_cpi_quarterly
macro_australia_cpi_qoq
20261113
1.20.42
macro_australia_cpi_yearly
macro_australia_cpi_yoy
20261113
1.20.42
macro_australia_ppi_quarterly
macro_australia_ppi_qoq
20261113
1.20.42
macro_australia_retail_rate_monthly
macro_australia_retail_sales_mom
20261113
1.20.42
macro_canada_core_cpi_monthly
macro_canada_core_cpi_mom
20261113
1.20.42
macro_canada_core_cpi_yearly
macro_canada_core_cpi_yoy
20261113
1.20.42
macro_canada_cpi_monthly
macro_canada_cpi_mom
20261113
1.20.42
macro_canada_cpi_yearly
macro_canada_cpi_yoy
20261113
1.20.42
macro_canada_gdp_monthly
macro_canada_gdp_mom
20261113
1.20.42
macro_canada_retail_rate_monthly
macro_canada_retail_sales_mom
20261113
1.20.42
macro_germany_cpi_monthly
macro_germany_cpi_mom
20261113
1.20.42
macro_germany_cpi_yearly
macro_germany_cpi_yoy
20261113
1.20.42
macro_germany_retail_sale_monthly
macro_germany_retail_sales_mom
20261113
1.20.42
macro_germany_retail_sale_yearly
macro_germany_retail_sales_yoy
20261113
1.20.42
macro_japan_core_cpi_yearly
macro_japan_core_cpi_yoy
20261113
1.20.42
macro_japan_cpi_yearly
macro_japan_cpi_yoy
20261113
1.20.42
macro_swiss_cpi_yearly
macro_swiss_cpi_yoy
20261113
1.20.42
macro_swiss_gbd_yearly
macro_swiss_gdp_yoy
20261113
1.20.42
macro_swiss_gdp_quarterly
macro_swiss_gdp_qoq
20261113
1.20.42
macro_uk_core_cpi_monthly
macro_uk_core_cpi_mom
20261113
1.20.42
macro_uk_core_cpi_yearly
macro_uk_core_cpi_yoy
20261113
1.20.42
macro_uk_cpi_monthly
macro_uk_cpi_mom
20261113
1.20.42
macro_uk_cpi_yearly
macro_uk_cpi_yoy
20261113
1.20.42
macro_uk_gdp_quarterly
macro_uk_gdp_qoq
20261113
1.20.42
macro_uk_gdp_yearly
macro_uk_gdp_yoy
20261113
1.20.42
macro_uk_halifax_monthly
macro_uk_halifax_mom
20261113
1.20.42
macro_uk_halifax_yearly
macro_uk_halifax_yoy
20261113
1.20.42
macro_uk_retail_monthly
macro_uk_retail_sales_mom
20261113
1.20.42
macro_uk_retail_yearly
macro_uk_retail_sales_yoy
20261113
1.20.42
macro_uk_rightmove_monthly
macro_uk_rightmove_mom
20261113
1.20.42
macro_uk_rightmove_yearly
macro_uk_rightmove_yoy
20261113
1.20.42
macro_china_hk_gbp
macro_china_hk_gdp
20261113
1.20.42
macro_china_hk_gbp_ratio
macro_china_hk_gdp_yoy
20261113
1.20.42
macro_china_hk_cpi_ratio
macro_china_hk_cpi_yoy
20261113
1.20.42
macro_china_hk_ppi
macro_china_hk_ppi_yoy
20261113
1.20.42
macro_china_hk_trade_diff_ratio
macro_china_hk_trade_balance_yoy
20261113
1.20.42
macro_china_hk_rate_of_unemployment
macro_china_hk_unemployment_rate
20261113
1.20.42
macro_china_hk_market_info
macro_china_hibor
20261113
1.20.42
macro_china_shibor_all
macro_china_shibor
20261113
1.20.42
macro_canada_new_house_rate
macro_canada_house_starts
20261113
1.20.42
macro_japan_head_indicator
macro_japan_leading_indicator
20261113
1.20.42
macro_usa_phs
macro_usa_pending_home_sales_em
20261113
1.20.42
macro_usa_crude_inner
macro_usa_crude_production
20261113
1.20.42
macro_euro_lme_stock
macro_lme_inventory
20261113
1.20.42
macro_cons_gold
macro_gold_etf_holding
20261113
1.20.42
macro_cons_silver
macro_silver_etf_holding
20261113
1.20.42
macro_usa_cftc_c_holding
macro_usa_cftc_commodity_noncommercial_holding
20261113
1.20.42
macro_usa_cftc_nc_holding
macro_usa_cftc_currency_noncommercial_holding
20261113
1.20.42
macro_usa_cftc_merchant_goods_holding
macro_usa_cftc_commodity_commercial_holding
20261113
1.20.42
macro_usa_cftc_merchant_currency_holding
macro_usa_cftc_currency_commercial_holding
20261113
1.20.42
macro_usa_cme_merchant_goods_holding
macro_usa_cme_metal_volume
20261113
1.20.42
macro_info_ws
macro_calendar_ws
20261113
1.20.42
macro_swiss_gbd_bank_rate
macro_swiss_bank_rate
20261113
1.20.42
macro_china_czsr
macro_china_fiscal_revenue
20261113
1.20.42
macro_china_gdzctz
macro_china_fixed_asset_investment
20261113
1.20.42
macro_china_gyzjz
macro_china_industrial_value_added
20261113
1.20.42
macro_china_hgjck
macro_china_customs_trade
20261113
1.20.42
macro_china_qyspjg
macro_china_cgpi
20261113
1.20.42
macro_china_shrzgm
macro_china_social_financing
20261113
1.20.42
macro_china_wbck
macro_china_deposit
20261113
1.20.42
macro_china_whxd
macro_china_fx_loan
20261113
1.20.42
macro_china_xfzxx
macro_china_consumer_confidence
20261113
1.20.42
macro_china_fx_gold
macro_china_fx_gold_em
20261113
1.20.42
macro_china_foreign_exchange_gold
macro_china_fx_gold_sina
20261113
1.20.42
macro_china_money_supply
macro_china_money_supply_em
20261113
1.20.42
macro_china_supply_of_money
macro_china_money_supply_sina
20261113
1.20.41
stock_financial_debt_new_ths
stock_balance_sheet_ths
20261113
1.20.41
stock_financial_benefit_new_ths
stock_profit_sheet_ths
20261113
1.20.41
stock_financial_cash_new_ths
stock_cash_flow_sheet_ths
20261113
1.20.41
stock_financial_abstract_new_ths
stock_financial_key_indicator_ths
20261113
1.20.41
bond_buy_back_hist_em
bond_repo_hist_em
20261113
1.20.41
bond_sh_buy_back_em
bond_repo_sh_em
20261113
1.20.41
bond_sz_buy_back_em
bond_repo_sz_em
20261113
1.20.41
bond_china_close_return
bond_zh_close_yield_cm
20261113
1.20.41
bond_china_close_return_map
bond_zh_close_yield_map_cm
20261113
1.20.41
bond_zh_us_rate
bond_zh_us_yield_em
20261113
1.20.41
bond_treasure_issue_cninfo
bond_treasury_issue_cninfo
20261113
1.20.41
stock_rank_forecast_cninfo
stock_rating_forecast_cninfo
20261113
1.20.41
stock_hold_change_cninfo
stock_share_change_all_cninfo
20261113
1.20.41
stock_price_js
stock_target_price_js
20261113
1.20.41
fund_open_fund_daily_em
fund_open_nav_em
20261113
1.20.41
fund_etf_fund_daily_em
fund_exchange_nav_em
20261113
1.20.41
fund_etf_fund_info_em
fund_exchange_nav_hist_em
20261113
1.20.41
fund_graded_fund_daily_em
fund_graded_nav_em
20261113
1.20.41
fund_graded_fund_info_em
fund_graded_nav_hist_em
20261113
1.20.41
fund_financial_fund_info_em
fund_financial_nav_hist_em
20261113
1.20.41
fund_money_fund_daily_em
fund_money_yield_em
20261113
1.20.41
fund_money_fund_info_em
fund_money_yield_hist_em
20261113
1.20.41
stock_info_global_em
stock_news_global_em
20261113
1.20.41
stock_info_global_sina
stock_news_global_sina
20261113
1.20.41
stock_info_global_futu
stock_news_global_futu
20261113
1.20.41
stock_info_global_ths
stock_news_global_ths
20261113
1.20.41
stock_info_global_cls
stock_news_global_cls
20261113
1.20.41
stock_info_cjzc_em
stock_news_cjzc_em
20261113
1.20.41
news_report_time_baidu
stock_calendar_report_baidu
20261113
1.20.41
news_trade_notify_dividend_baidu
stock_calendar_dividend_baidu
20261113
1.20.41
news_trade_notify_suspend_baidu
stock_calendar_suspend_baidu
20261113
1.20.41
news_economic_baidu
macro_calendar_baidu
20261113
1.20.41
index_inner_quote_sugar_msweet
index_inner_quota_sugar_msweet
20261113
1.20.41
index_outer_quote_sugar_msweet
index_outer_quota_sugar_msweet
20261113
1.20.31
get_shfe_daily
futures_daily_shfe
20261105
1.20.31
get_dce_daily
futures_daily_dce
20261105
1.20.31
get_czce_daily
futures_daily_czce
20261105
1.20.31
get_cffex_daily
futures_daily_cffex
20261105
1.20.31
get_ine_daily
futures_daily_ine
20261105
1.20.31
get_gfex_daily
futures_daily_gfex
20261105
1.20.31
get_futures_daily
futures_daily
20261105
1.20.31
get_shfe_rank_table
futures_rank_table_shfe
20261105
1.20.31
get_dce_rank_table
futures_rank_table_dce
20261105
1.20.31
get_cffex_rank_table
futures_rank_table_cffex
20261105
1.20.31
get_rank_table_czce
futures_rank_table_czce
20261105
1.20.31
get_rank_sum
futures_rank_sum
20261105
1.20.31
get_rank_sum_daily
futures_rank_sum_daily
20261105
1.20.31
get_receipt
futures_receipt
20261105
1.20.31
get_roll_yield
futures_roll_yield
20261105
1.20.31
get_roll_yield_bar
futures_roll_yield_bar
20261105
1.20.31
get_us_stock_name
stock_us_name_sina
20261105
1.17.81
get_czce_rank_table
get_rank_table_czce
20251103
1.17.81
futures_czce_warehouse_receipt
futures_warehouse_receipt_czce
20251103
1.17.72
futures_dce_warehouse_receipt
futures_warehouse_receipt_dce
20251027
1.17.68
option_gfex_vol_daily
option_vol_gfex
20251017
1.17.68
option_gfex_daily
option_hist_gfex
20251017
1.17.68
option_shfe_daily
option_hist_shfe
20251017
1.17.68
option_czce_daily
option_hist_czce
20251017
1.17.68
option_dce_daily
option_hist_dce
20251017
1.17.68
option_czce_hist
option_hist_yearly_czce
20251017
1.16.29
futures_global_em
futures_global_spot_em
20250305
1.13.88
index_cflp_volume
index_volume_cflp
20240527
1.13.88
index_cflp_price
index_price_cflp
20240527
1.13.19
car_gasgoo_sale_rank
car_sale_rank_gasgoo
20240403
1.13.19
car_energy_sale_cpca
car_market_fuel_cpca
20240403
1.13.15
car_market_cpca
car_market_total_cpca
20240331
1.12.95
futures_hog_rank
futures_hog_cost
20240318
1.12.95
futures_hog_info
futures_hog_core
20240318
1.12.93
get_bond_bank
bond_debt_nafmii
20240316
1.12.91
stock_telegraph_cls
stock_info_global_cls
20240313
1.12.11
stock_zh_index_spot
stock_zh_index_spot_sina
20240104
1.11.64
futures_sgx_daily
futures_settlement_price_sgx
20231108
1.11.61
fund_manager
fund_manager_em
20231105
1.11.41
weibo_index
index_weibo_sina
20231020
1.11.39
option_300etf_min_qvix
index_option_300etf_min_qvix
20231019
1.11.39
option_300etf_qvix
index_option_300etf_qvix
20231019
1.11.39
option_50etf_min_qvix
index_option_50etf_min_qvix
20231019
1.11.39
option_50etf_qvix
index_option_50etf_qvix
20231019
1.10.50
car_cpca_energy_sale
car_energy_sale_cpca
20230710
1.10.36
stock_em_sy_hy_list
stock_sy_hy_em
20230624
1.10.36
stock_em_sy_list
stock_sy_em
20230624
1.10.36
stock_em_sy_jz_list
stock_sy_jz_em
20230624
1.10.36
stock_em_sy_yq_list
stock_sy_yq_em
20230624
1.10.36
stock_em_sy_profile
stock_sy_profile_em
20230624
1.10.8
futures_nh_volatility_index
futures_volatility_index_nh
20230606
1.9.37
stock_hk_eniu_indicator
stock_hk_indicator_eniu
20230404
1.9.27
fund_em_hk_rank
fund_hk_rank_em
20230330
1.9.27
fund_em_lcx_rank
fund_lcx_rank_em
20230330
1.9.27
fund_em_money_rank
fund_money_rank_em
20230330
1.9.27
fund_em_exchange_rank
fund_exchange_rank_em
20230330
1.9.7
stock_profit_forecast
stock_profit_forecast_em
20230330
1.8.38
macro_cons_silver_amount
macro_cons_silver
20221227
1.8.38
macro_cons_silver_change
macro_cons_silver
20221227
1.8.38
macro_cons_silver_volume
macro_cons_silver
20221227
1.8.38
macro_cons_gold_amount
macro_cons_gold
20221227
1.8.38
macro_cons_gold_change
macro_cons_gold
20221227
1.8.38
macro_cons_gold_volume
macro_cons_gold
20221227
1.8.23
stock_restricted_shares
stock_restricted_release_queue_sina
20221122
1.8.3
stock_em_qbzf
stock_qbzf_em
20221122
1.8.3
stock_em_pg
stock_pg_em
20221122
1.7.99
stock_sina_lhb_jgmx
stock_lhb_jgmx_sina
20221119
1.7.99
stock_sina_lhb_jgzz
stock_lhb_jgzz_sina
20221119
1.7.99
stock_sina_lhb_yytj
stock_lhb_yytj_sina
20221119
1.7.99
stock_sina_lhb_ggtj
stock_lhb_ggtj_sina
20221119
1.7.99
stock_sina_lhb_detail_daily
stock_lhb_detail_daily_sina
20221119
1.7.82
index_analysis_sw
index_analysis_daily_sw
20220921
1.7.27
stock_em_qsjy
stock_qsjy_em
20220921
1.7.23
futures_pig_info
futures_hog_info
20220916
1.7.23
futures_pig_rank
futures_hog_rank
20220916
1.6.86
stock_em_gpzy_distribute_statistics_company
stock_gpzy_distribute_statistics_company_em
20220811
1.6.86
stock_em_gpzy_distribute_statistics_bank
stock_gpzy_distribute_statistics_bank_em
20220811
1.5.94
bond_conv_adj_logs_jsl
bond_cb_adj_logs_jsl
20220524
1.5.94
bond_cov_jsl
bond_cb_jsl
20220524
1.5.53
stock_em_xjll
stock_xjll_em
20220501
1.5.53
stock_em_lrb
stock_lrb_em
20220501
1.5.53
stock_em_zcfz
stock_zcfz_em
20220501
1.5.52
stock_em_ggcg
stock_ggcg_em
20220501
1.5.48
futures_nh_price_index
futures_price_index_nh
20220428
1.5.48
futures_nh_index_symbol_table
futures_index_symbol_table_nh
20220428
1.5.48
futures_nh_return_index
futures_return_index_nh
20220428
1.5.46
stock_em_yzxdr
stock_yzxdr_em
20220427
1.5.34
stock_em_gpzy_industry_data
stock_gpzy_industry_data_em
20220420
1.5.26
stock_em_comment
stock_comment_em
20220415
1.5.25
stock_em_analyst_detail
stock_analyst_detail_em
20220415
1.5.25
stock_em_analyst_rank
stock_analyst_rank_em
20220415
1.5.18
fund_em_open_fund_rank
fund_open_fund_rank_em
20220414
1.5.12
stock_em_gpzy_pledge_ratio_detail
stock_gpzy_pledge_ratio_detail_em
20220410
1.5.10
stock_em_gpzy_pledge_ratio
stock_gpzy_pledge_ratio_em
20220410
1.5.10
stock_em_gpzy_profile
stock_gpzy_profile_em
20220410
1.4.88
fund_em_new_found
fund_new_found_em
20220323
1.4.86
fund_em_aum_hist
fund_aum_hist_em
20220322
1.4.86
fund_em_aum_trend
fund_aum_trend_em
20220322
1.4.86
fund_em_aum
fund_aum_em
20220322
关注公众号【数据科学实战】
微信扫码,获取更多财经数据与量化投研知识
当前页面
显示源代码
BREAKING CHANGE: 移除 get_qhkc_index、get_qhkc_index_trend、get_qhkc_index_profit_loss、 get_qhkc_fund_bs、get_qhkc_fund_position、get_qhkc_fund_money_change…
Dev (#7457)
* docs: 清理文档中已删除或已改名的接口
1. tutorial.md 接口清单:7 个改名接口换成新名称(fund_*_rank_em、option_commodity_*_sina),
删除 21 个已删除接口和 8 个奇货可查接口的条目,以及因此变空的 12 个小节标题;
复查清单中 978 个接口均可在 akshare 中找到
2. docs/data 删除已下线接口 option_czce_hist、fortune_rank、stock_zh_a_tick_tx 的文档条目,
并从 registry_baseline.json 的 orphaned 名单移除
3. fund_hk_fund_hist_em 参数说明中的 ak.fund_em_hk_rank() 改为 ak.fund_hk_rank_em()
4. answer.md 删除已移除的疫情数据接口(2 条)和 execjs 报错(1 条),并重新编号
5. llms.txt 示例中不存在的 ak.crypto_hist() 改为 ak.crypto_js_spot()
* docs: 移除奇货可查(qhkc)文档分类
奇货可查网站上 akshare 抓取的数据端点均已下线:qhkc_web 的 8 个网页接口中 7 个报
KeyError: 'data',1 个返回空表。删除 docs/data/qhkc 下 6 个页面及数据字典目录入口。
相关代码暂未删除,另行评估。
* docs: 修正与实际实现不符的文档内容
1. 修正 8 个接口的输入参数表,使之与函数签名一致:bond_index_general_cbond(period)、
futures_spot_sys(indicator)、futures_zh_spot(symbol)、bond_zh_hs_cov_pre_min 与
stock_board_concept_spot_em(补 symbol)、3 个百度股市通接口(补可选的 cookie);
全量复查后参数表与签名不一致的条目为 0
2. answer.md:删除 pandas 0.25 时代的 StringIO 报错条目;代理报错不再建议把 urllib3
降到有安全漏洞的 1.25.8,改为说明代理地址协议的正确写法
3. dependency.md:pandas 版本改为 >=2.0.0,说明 Linux 上使用 py-mini-racer 与 akracer,
移除已下线的 sqreen 博客链接
4. demo.md:去掉 matplotlib==3.2.2 的版本限制(该版本没有 Python 3.11+ 安装包;实测
backtrader 1.9.78.123 配合 matplotlib 3.11.2 可正常绘图)
5. installation.md:“拒绝访问”的解决办法不再推荐与前文矛盾的 --user,改为在虚拟环境中安装
6. special.md:EPU 指数致谢链接改为 policyuncertainty.com
7. tutorial.md:修正港股实时与历史接口注释写反、上证50期权误注为沪深300、外汇接口误注
为债券市场行情、get_futures_daily 误注为基差数据、“四个交易所”过时等注释错误
* docs(contributing): 按当前开发流程重写贡献指南
1. 克隆及提交:分支名由不存在的 akshare-dev 改为 dev,补充 Fork、uv sync、安装钩子、
Conventional Commits 提交规范和向 dev 发起 PR 的完整流程
2. 命名范例由不存在的 stock_zh_a_hist_sina 改为 stock_zh_a_hist_tx,补充常见数据源后缀,
并说明新接口需要在 akshare/__init__.py 中导入
3. 文档示例改用 stock.md 中 stock_zh_a_minute 的真实条目:标题改为 ###,外层用四个反引号
包裹,去掉原示例中会被渲染出来的反斜杠转义,参数表与输出列也与实际一致
4. 说明 build_registry.py 已由 pre-commit 自动运行,修改 __init__.py 的导入时同样需要
同时在 .pre-commit-config.yaml 中设置 default_install_hook_types,使 pre-commit install
一次安装 pre-commit 与 commit-msg 两个钩子;此前只运行 pre-commit install 时,
提交信息规范检查不会生效。
* docs: 修正错别字、中文标点与排版问题
1. 错别字:“深证证券交易所”改为“深圳证券交易所”(文档、README 及 5 个模块的 docstring,
共 18 处,均为说明文字,不涉及列名与参数值);“外汇掉漆”改为“外汇掉期”;
“代用”“Pyhton”“祝您一臂之力”“游览器”“对其”分别改为“调用”“Python”“助您”
“浏览器”“对齐”
2. 标点:registry.md 中文语境的半角标点、英文引号与 getattr(ak,接口名) 中误用的
全角逗号;installation、anaconda、tutorial、introduction、akdocker 中的半角句点、
冒号与分号
3. 排版:answer.md 中顶格写的代码块会打断列表,改为行内代码或缩进到列表项内;
installation.md 错误排查小节的编号补空格;anaconda.md 中不是命令的 “Proceed 输入 y”
不再放进代码块;akdocker.md 的 docker 命令补上 shell 标注;data_tips.md 的数据输出
去掉 shell 标注
* feat!: 移除已失效的奇货可查网页接口
奇货可查网站上 akshare 抓取的数据端点均已下线,qhkc_web 的 8 个接口中 7 个报
KeyError: 'data',1 个返回空表。
1. 删除 akshare/qhkc_web(8 个接口)与 akshare/qhkc(未被引用的 pro_api 演示脚本),
以及 akshare/futures/cons.py 中仅供其使用的 10 个 QHKC_* 网址常量
2. 从 akshare/__init__.py 移除导入,重新生成 __all__ 与 interfaces.json,并从
registry_baseline.json 的 undocumented 名单移除这 8 个接口(75 -> 67)
3. registry.md 的 list_categories 示例输出更新为实际结果
4. 版本号升至 1.19.4 并更新日志
pro_api、set_token、get_token 不受影响。
BREAKING CHANGE: 移除 get_qhkc_index、get_qhkc_index_trend、get_qhkc_index_profit_loss、
get_qhkc_fund_bs、get_qhkc_fund_position、get_qhkc_fund_money_change、
qhkc_tool_foreign、qhkc_tool_gdp
* docs(trade): 合作方名称统一为“某AA级期货公司”
* docs: 为大连商品交易所相关接口补充瑞数反爬说明
大连商品交易所网站启用瑞数反爬虫验证后,涉及该网站的 16 个接口均无法获取数据,
但除 futures_warehouse_receipt_dce 外,报错各不相同(JSONDecodeError、BadZipFile、
No tables found、IndexError),get_dce_rank_table 与 get_roll_yield_bar 甚至静默返回
空结果,用户难以联想到是反爬所致。逐个实测后:
1. docs/data 中 7 个有文档的接口在“描述”中补充说明并链接到常见问题,
get_futures_daily 注明只有 market="DCE" 受影响
2. answer.md 新增一条常见问题,列出原因、常见报错表现与全部受影响接口
3. tutorial.md 接口清单中对应的 15 个接口加注“暂不可用”
* docs: 只推荐 uv,修正 R 与 MATLAB 示例并更新外链
1. 环境推荐:安装页先介绍 uv(推荐)再介绍 pip,去掉单独的“使用 Anaconda 安装”;
Anaconda 环境配置页只面向需要在 R 语言或 MATLAB 中调用的用户;README 与 llms.txt
补充 uv 的安装方式,国内镜像统一为清华源;demo.md 中的 conda 改为 uv pip
2. R 示例:去掉错误的 /usr 是“用户名”的说法和不存在的 /king/local/bin/python 路径,
改为用 use_condaenv() 指定 conda 虚拟环境,并给出 Windows 与 macOS 的 use_python() 路径写法
3. MATLAB 示例:不存在的 py2matlab() 改为 R2024a 起支持的 table(),并在安装说明中建议
R2024a 及以上版本;下载链接由会跳到“未授权”错误页的 R2023b 地址改为 MATLAB 下载页
4. 外链:Anaconda 下载改为 anaconda.com/download(原 products/individual 已重定向,
repo.anaconda.com/archive 是历史版本归档);AKTools 文档统一为 aktools.akfamily.xyz
* docs: 数据字典输出类型按 pandas 3 规范更新
项目锁定的 pandas 3 默认把文本列推断为字符串类型(dtypes 显示为 str),而数据字典
沿用 pandas 2 的写法,把文本列一律写作 object。
1. 对 956 个含 object 列的接口条目逐个运行其接口示例,按实际 dtype 更新:747 个
调用成功,涉及的 2294 行全部按实测结果填写(str 1597、object 652,另有 49 行实测
为 float64、int64、datetime64 等)
2. 其余 209 个条目调用失败或超时(含上游失效与大商所反爬),按源码静态判断:
普通文本列改为 str(647 行);经 .dt.date 转换的日期、pd.to_datetime 结果等无法
确认的列保留 object(175 行)。用实测结果检验该判断规则的准确率约为 89%
3. 统一不规范写法:float 改为 float64(86 行)、int 改为 int64(7 行),修正笔误
floaint64t64
4. contributing.md 的类型规范改为 pandas 3 的实际类型,并说明 str、object、
datetime64 各自的适用情况;registry.md 中检索接口的文本列改为 str
* perf(registry): 优化接口检索打分性能
每条记录的待搜索字段提取为 _prepare,_rank 对每条记录只归一化一次,
在主分与 2-gram 降级分两轮打分之间复用;_score 仍是唯一的打分实现。
_normalize 改用 str.split()/join,空白判定与正则 \s 一致。
单次检索耗时约减少一半,511 个查询的结果与排序与改动前完全一致。
思路参考 #7455。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
* ci: bump astral-sh/setup-uv from 10.2.0 to 10.3.0 in the actions group
Dev (#7450)
* ci: bump astral-sh/setup-uv from 10.2.0 to 10.3.0 in the actions group (#7442)
Bumps the actions group with 1 update: [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv).
Updates `astral-sh/setup-uv` from 10.2.0 to 10.3.0
- [Release notes](https://github.com/astral-sh/setup-uv/releases)
- [Commits](astral-sh/setup-uv@v10.2.0...v10.3.0)
---
updated-dependencies:
- dependency-name: astral-sh/setup-uv
dependency-version: 10.3.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: actions
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps): bump virtualenv from 21.7.4 to 21.7.13 (#7441)
Bumps [virtualenv](https://github.com/pypa/virtualenv) from 21.7.4 to 21.7.13.
- [Release notes](https://github.com/pypa/virtualenv/releases)
- [Changelog](https://github.com/pypa/virtualenv/blob/main/docs/changelog.rst)
- [Commits](pypa/virtualenv@21.7.4...21.7.13)
---
updated-dependencies:
- dependency-name: virtualenv
dependency-version: 21.7.13
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* build(deps-dev): bump the python group across 1 directory with 3 updates (#7449)
Bumps the python group with 3 updates in the / directory: [ruff](https://github.com/astral-sh/ruff), [commitizen](https://github.com/commitizen-tools/commitizen) and [pre-commit](https://github.com/pre-commit/pre-commit).
Updates `ruff` from 0.16.10 to 0.17.1
- [Release notes](https://github.com/astral-sh/ruff/releases)
- [Changelog](https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md)
- [Commits](astral-sh/ruff@0.16.10...0.17.1)
Updates `commitizen` from 4.19.1 to 4.19.2
- [Release notes](https://github.com/commitizen-tools/commitizen/releases)
- [Changelog](https://github.com/commitizen-tools/commitizen/blob/master/CHANGELOG.md)
- [Commits](commitizen-tools/commitizen@v4.19.1...v4.19.2)
Updates `pre-commit` from 4.6.2 to 4.7.0
- [Release notes](https://github.com/pre-commit/pre-commit/releases)
- [Changelog](https://github.com/pre-commit/pre-commit/blob/main/CHANGELOG.md)
- [Commits](pre-commit/pre-commit@v4.6.2...v4.7.0)
---
updated-dependencies:
- dependency-name: ruff
dependency-version: 0.17.1
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: python
- dependency-name: commitizen
dependency-version: 4.19.2
dependency-type: direct:development
update-type: version-update:semver-patch
dependency-group: python
- dependency-name: pre-commit
dependency-version: 4.7.0
dependency-type: direct:development
update-type: version-update:semver-minor
dependency-group: python
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* fix(bond_zh_cov_value_analysis): 修复接口字段数变化导致的列长度不匹配
东方财富可转债价值分析接口新增 FLOORPRICE_PREMIUM_RATIO_CB、BOND_NAME_ABBR 字段,
返回列数由 13 变为 15,按位置赋值列名时报 Length mismatch。
1. 改为按字段名映射日期、收盘价、纯债价值、转股价值、纯债溢价率和转股溢价率,输出格式不变
2. 补充 15 秒请求超时
3. 更新版本号与更新日志
Fixes #7448
* fix(stock_fund_flow): 资金流向接口在请求前校验 symbol 参数
stock_fund_flow_individual、stock_fund_flow_concept、stock_fund_flow_industry 的
if/elif 链对非法 symbol 没有兜底,会静默落入“即时”分支:先抓完全部分页(个股约 100
多次请求),最后才在列命名处报出与根因无关的 Length mismatch。
1. 新增 _check_ths_fund_flow_symbol,三个函数入口处即校验,非法值在计算 hexin-v 和
发出任何请求前抛出 InvalidParameterError,并列出可选值
2. 更新版本号与更新日志
Fixes #7444
* build: 增加对 Python 3.15 的支持
1. CI 测试矩阵加入 Python 3.15,pyproject.toml 增加 3.15 的 classifier
2. CI 的 UV_VERSION 由 0.12.3 升至 0.13.5:0.13.0 起才认识 3.15.0 正式版,
0.13.5 起认识 3.15.1,旧版 uv 只会装上 3.15.0rc1;用 0.13.5 重新 lock 无变化
已在 Windows + Python 3.15.1 上验证:锁定依赖 34 个包均有预编译 wheel,pytest
85 项通过,全部模块编译与导入无警告,mini-racer/curl_cffi/lxml/Excel 解析等
接口实测正常。
* fix(scripts): build_registry 仅在内容变化时写入并沿用原有行尾
本仓库在 Windows 上 core.autocrlf=true,工作区文件是 CRLF,而脚本每次都以 LF
无条件重写 interfaces.json 和 __init__.py。pre-commit 钩子在每次提交时运行该脚本,
导致提交后工作区总残留一个只有行尾差异的 interfaces.json。
新增 write_if_changed:内容未变时不写入;需要写入时沿用目标文件现有的行尾风格,
新建文件用 LF。补充 4 个对应测试。
* ci: 更新 setup-uv 版本说明注释
---------
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
* fix(futures_shfe_warehouse_receipt): 修复 2025-11-18 之后仓单日报无法获取的问题
Dev (#7433)
* fix(futures_shfe_warehouse_receipt): 修复 2025-11-18 之后仓单日报无法获取的问题
上海期货交易所自 2025-11-18 起不再提供 dailydata/{date}dailystock.dat 数据文件,
接口报 JSONDecodeError(见 #7093、#7432),仓单日报改为网页版
stockdata/dailystock_{date}/ZH/all.html。
1. date >= "20251118" 时解析网页版日报,按表头名称映射列,兼容“地区、仓库”
“厂库、地区”“地区、交割仓库、本日数量”等列顺序,并处理 rowspan/colspan
合并单元格;输出 VARNAME、REGNAME、WHABBRNAME、WRTWGHTS、WRTCHANGE、ROWSTATUS
2. 更早日期仍走原数据文件逻辑,行为不变
3. 新数据源设置 15 秒请求超时;更新接口文档、版本号与更新日志
Co-authored-by: kingcharleslzy-ai <260348840+kingcharleslzy-ai@users.noreply.github.com>
* fix(futures_warehouse_receipt): 修复广期所仓单日报并为大商所反爬拦截抛出明确错误
1. futures_gfex_warehouse_receipt:广州期货交易所将增减字段由 regWbillQty 改为 diff,
接口报 KeyError;现改为按 diff 映射,并修正“增减”列取值(原 regWbillQty 并非增减量),
补充 15 秒请求超时
2. futures_warehouse_receipt_dce:大连商品交易所网站启用瑞数反爬虫验证,程序请求返回
HTTP 412,接口此前抛出 JSONDecodeError;现改为抛出携带状态码的 APIError 并说明原因,
补充 15 秒请求超时;冒烟测试中的大商所调用移至末尾
3. 更新接口文档与数据示例、版本号(1.18.99、1.19.1)及更新日志
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
Co-authored-by: kingcharleslzy-ai <260348840+kingcharleslzy-ai@users.noreply.github.com>
fix(stock_report_fund_hold): 修复接口字段错位并添加请求超时
fix(stock_report_fund_hold): 修复接口字段错位并添加请求超时 (#7427)
1. 修复东方财富返回字段顺序变动导致的列错位问题,改用字段名映射提取数据
2. 为接口设置15秒请求超时,避免上游无响应时进程阻塞
3. 更新接口文档、变更日志与文档更新时间
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
fix(stock_zh_a_spot): 修复接口超时阻塞问题
fix(stock_zh_a_spot): 修复接口超时阻塞问题 (#7425)
* fix(stock_zh_a_spot): 修复接口超时阻塞问题
为接口的所有HTTP请求添加15秒超时限制,避免上游无响应时进程长时间阻塞;更新接口文档补充超时规则说明,同步更新项目版本号、变更日志与文档更新时间
* ci(pre-commit): 新增构建接口注册表的预提交钩子
当 docs/data 目录下的 Markdown 文件或 akshare/__init__.py 变更时触发该钩子,运行 scripts/build_registry.py 预先生成接口注册表与 __all__,避免被 CI 的 registry-check 拦下。
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
* build(pre-commit): 改用 lint 组的 ruff,消除第二处版本钉版
Dev (#7424)
* build(pre-commit): 改用 lint 组的 ruff,消除第二处版本钉版 (#7422)
ruff-pre-commit 的 rev 是独立于 pyproject.toml lint 组的第二处版本钉版,
而 Dependabot 的 uv 生态只改得动 pyproject.toml,因此每次 ruff 升级都要人工
补一次 rev:0.16.3→0.16.4 在 #7408 升级后靠 #7409 补齐,#7421 又重演了一次。
改为 repo: local 钩子,跑 CI lint job 的同一条命令
uv run --locked --only-group lint ruff ...,版本号只剩 pyproject.toml 一处,
Dependabot 现有的 uv 生态即可完整覆盖,今后 ruff 升级是一个原子 PR。
不改为新增 dependabot pre-commit 生态:groups 按 package-ecosystem 划分,
无法跨生态分组,ruff 升级仍会是两个独立 PR、在不同时间合并。
附带两点收益:pre-commit 与 CI 跑同一个锁定的 wheel(原先两处版本号即便
对齐,wheel 也是两次独立解析);--locked 会在改过 pyproject.toml 却漏跑
uv lock 时提交失败,把 CI 安装步骤的报错提前到本地。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
* fix(stock_feature): 乐咕乐股接口在上游拒绝时给出明确报错 (#7423)
issue #7417 报告 legu 系列接口全部抛出
AttributeError: 'NoneType' object has no attribute 'attrs'。
根因在共用助手 get_cookie_csrf:既不校验响应状态码,也不判断
soup.find 的返回值。上游对其拒绝的客户端返回 nginx 403,该错误页不含
_csrf meta 标签,于是在 None 上取 .attrs 而崩溃。已确定性复现整条失败链。
接口本身完好:本地 14 个受影响接口全部调用成功,数据形状与修复前一致,
上游 API 契约未变。报告者遇到的 403 是环境相关(IP 被上游拒绝),
akshare 无法解除封禁,但必须把真实原因告诉用户。
原先的报错不含状态码也不提上游,用户无从自查,同一报错自 2024 年起
已复发多次(#4680、#4782、#4785、#4787、#7237、#7417),每次都被判定为
上游问题后关闭。现改为沿用 fund_portfolio_em.py 的既有范式:
非 2xx 抛出携带 status_code 的 APIError,页面缺少 _csrf 标签抛出
DataParsingError。
新增 tests/test_legu_csrf.py,6 个用例全程不联网,用 monkeypatch 顶替
requests.Session.get,覆盖 403、连接异常、标签缺失、成功路径,
并确认未污染全库共用的 cons.headers。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
* feat(stock_fundamental): 优化股票基本面接口,更新配套文档
1. 为stock_financial_debt_new_ths新增一季度至四季度的查询维度,更新对应接口文档的参数说明与使用示例
2. 重构stock_financial_hk_em.py代码,提取公共方法并增加API异常处理,修复港股财务分析指标的币种回填问题
3. 重构stock_recommend.py的HTML表格解析逻辑,适配新版pandas,添加请求超时设置避免请求挂起
4. 更新变更日志与接口文档,补充v1.18.95版本变更记录
* build(registry): regenerate interfaces registry
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
fix(stock_board_concept_hist_em): 优化错误处理与空数据兜底逻辑
fix(stock_board_concept_hist_em): 优化错误处理与空数据兜底逻辑 (#7406)
* fix(stock_board_concept_hist_em): 优化错误处理与空数据兜底逻辑
- 新增无效概念板块名称与代码校验,抛出明确异常
- 无历史数据时返回带固定列的空 DataFrame
- 更新接口文档、更新日志与版本号至 1.18.94
* fix: satisfy ruff format in stock_board_concept_em
Co-authored-by: albertandking <18234520+albertandking@users.noreply.github.com>
* chore(stock): 修正中文标点并简化错误提示代码
将README.md中的半角分号修正为全角中文分号,适配中文排版规范
合并stock_board_concept_em.py中的多行错误提示语句为单行,提升代码可读性
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
fix(fund): 修复fund_money_fund_info_em接口字段不匹配问题
fix(fund): 修复fund_money_fund_info_em接口字段不匹配问题 (#7405)
修复东方财富网货币基金历史净值接口因返回体新增字段导致的列长度不匹配问题,改为按字段名映射所需列以保持兼容,同步更新版本号、相关文档与变更日志。
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
fix(stock): 更新雪球token并完善接口登录态说明
fix(stock): 更新雪球token并完善接口登录态说明 (#7398)
- 更新stock/cons.py中的内置xq_a_token值
- 优化雪球个股接口的错误提示,明确匿名访问受限需传入有效token
- 补充多市场雪球公司信息接口的登录态依赖文档说明
- 更新项目文档的更新时间与变更日志
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
迁移文档Markdown解析器从recommonmark至myst-parser,移除sphinx-markdown-tables与markdown依赖 修正docs目录下文档的标题层级,确保每个页面拥有唯一一级标题且接口支持锚点链接 为dependabot配置依赖分组,避免多个拉取请求同时修改同一
docs: 发布1.18.91版本,优化文档解析器与结构 (#7393)
迁移文档Markdown解析器从recommonmark至myst-parser,移除sphinx-markdown-tables与markdown依赖
修正docs目录下文档的标题层级,确保每个页面拥有唯一一级标题且接口支持锚点链接
为dependabot配置依赖分组,避免多个拉取请求同时修改同一文件冲突
新增发布前版本校验脚本,完善CI发布流程
更新版本号并补充对应更新日志到changelog.md
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.90 and release-v1.18.91 there were 1 commits, 1 of them substantive:
* chore: 更新.gitignore规则并清理废弃设计文档
Dev (#7386)
* chore: 更新.gitignore规则并清理废弃设计文档
更新.gitignore中关于临时产物的注释,明确AI辅助流程的中间产物仅本地保留不入库;新增plans/和specs/目录的忽略配置。
* build: 提升最低支持Python版本至3.11
同步更新pyproject.toml配置,调整requires-python版本、Python分类器及ruff目标版本;修复uv.lock中为Python3.9保留的旧版本依赖分支引发的安全告警;新增GitHub Dependabot配置自动跟进uv和GitHub Actions依赖更新;同步更新所有文档中的Python最低版本要求,更新版本号至1.18.89并补充对应更新日志。
* build: 移除qmt/full依赖并自动维护__all__列表
移除pyproject.toml和uv.lock中的qmt/full可选依赖配置,删除akshare/__init__.py中的akqmt导入代码。新增build_registry脚本的逻辑,自动生成并维护公开API的__all__列表,避免from akshare import *导入多余子模块污染用户命名空间,同时更新akshare/__init__.py的__all__为自动生成的完整公开API清单。
* build: 发布v1.18.90,移除akqmt集成并声明__all__
- 为akshare模块声明__all__,修复`from akshare import *`导出额外子模块的问题
- 移除akqmt集成及full、qmt两个附加依赖组,清理相关依赖配置
- 修正README中的Python版本要求、失效的仓库徽章与代码风格描述
- 更新测试用例以适配__all__相关的校验逻辑
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.88 and release-v1.18.90 there were 1 commits, 1 of them substantive:
fix(interface): 修复 fund_portfolio_hold_em 接口
fix(interface): 修复 fund_portfolio_hold_em 接口 (#7383)
- 升级项目版本至1.18.88,同步更新变更日志与包初始化文件
- 优化stock_hot_xq.py异常处理格式与stock_margin_bse.py列名排版
- 更新pre-commit配置,升级ruff至0.16.2并调整hook命令
- 重构pyproject.toml依赖管理,采用PEP 735依赖分组规范
- 优化GitHub CI工作流,拆分lint与test任务并调整uv配置
- 清理.gitignore,移除对uv.lock的追踪
- 更新文档依赖说明与配置文件
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.87 and release-v1.18.88 there were 1 commits, 1 of them substantive:
fix(tools&docs): 统一全库中文标点规范,优化标点检查工具
fix(tools&docs): 统一全库中文标点规范,优化标点检查工具 (#7382)
- 升级版本号至1.18.87
- 修复全库内文档、代码注释与字符串中的半角/全角标点混用问题
- 优化check_punctuation工具,避免误修改纯英文内容的标点
- 更新pre-commit配置与变更日志,完善CI检查流程
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.86 and release-v1.18.87 there were 1 commits, 1 of them substantive:
- 升级包版本从1.18.85至1.18.86 - 在变更日志中添加1.18.86版本的更新记录 - 修正所有代码注释、文档字符串以及Markdown文档中的半角冒号为全角冒号(根据pre-commit配置排除变更日志文件) - 新增pre-commit钩子以强制执行中文标点使用规范
style: 规范中文标点符号并更新版本至1.18.86 (#7381)
- 升级包版本从1.18.85至1.18.86
- 在变更日志中添加1.18.86版本的更新记录
- 修正所有代码注释、文档字符串以及Markdown文档中的半角冒号为全角冒号(根据pre-commit配置排除变更日志文件)
- 新增pre-commit钩子以强制执行中文标点使用规范
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.85 and release-v1.18.86 there were 1 commits, 1 of them substantive:
* docs(spec): 修正 baseline 存量为 85 并明确非数据接口排除清单
Dev (#7380)
* docs(spec): 新增接口检索层设计文档
* docs(spec): 修正 baseline 存量为 85 并明确非数据接口排除清单
* docs(plan): 新增接口检索层实施计划
* chore: 忽略 superpowers SDD 本地工作区
* docs(plan): 修正 ruff 范围与集成测试文件拆分
* feat(registry): 新增文档表格解析器
* test(registry): 覆盖 parse_table 的 2/4 列容错分支
* feat(registry): 新增接口条目解析
* docs: 修正接口条目统计为冒号容错后的准确值
* fix(registry): 接口边界冒号容错全角并补充 collect_doc_records 测试
* feat(registry): 新增导出表静态解析
从 akshare/__init__.py 静态解析出接口名到模块路径的映射,显式排除
版本号/pro_api/token 相关/异常类等 11 个非数据接口。
* feat(registry): 生成接口元数据产物
* test(registry): 强化确定性测试的回归捕获力
* feat(registry): 新增 --check 门禁与 baseline 棘轮
* test(registry): 覆盖 baseline 陈旧孤儿项的棘轮分支
* feat(registry): 新增运行期数据加载与打分函数
* test(registry): 钉住 category 权重在打分体系中的相对次序
* feat(registry): 新增 search/interface_info/list_categories 接口
* fix(registry): 修正精确名匹配排序并加固检索接口健壮性
* test(registry): 覆盖 interface_info 深拷贝隔离缓存的行为
* feat(registry): 导出检索接口至公开 API
* fix(registry): 将检索层自身 API 排除在数据接口清单之外
* test(registry): 为不变量集成测试补空集守卫
* ci(registry): 新增接口一致性门禁并同步版本文档
* fix(registry): 检索匹配空白归一化并修正精确名判定一致性
* docs(registry): 同步 llms.txt 与延后项清单并校正 changelog 措辞
* docs(registry): 归档空白归一化引入的跨词假匹配延后项
* docs(registry): 新增接口检索文档并同步 README 与快速入门
---------
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.84 and release-v1.18.85 there were 1 commits, 1 of them substantive:
fix(index): 修复index_all_cni和sw_index_third_cons接口
fix(index): 修复index_all_cni和sw_index_third_cons接口 (#7379)
修复index_all_cni接口因国证指数返回字段新增引发的Length mismatch错误,修复sw_index_third_cons接口因乐咕乐股表头变化及噪声数据导致的解析异常,新增表头清洗逻辑,同步更新版本号与相关文档
Co-authored-by: smartmakeswatch <206515907+smartmakeswatch@users.noreply.github.com>
This project publishes no release notes. Between release-v1.18.83 and release-v1.18.84 there were 1 commits, 1 of them substantive:
This project publishes no release notes. Between release-v1.18.82 and release-v1.18.83 there were 1 commits, 1 of them substantive:
This project publishes no release notes. Between release-v1.18.82 and release-v1.18.83 there were 1 commits, 1 of them substantive:
This project publishes no release notes. Between release-v1.18.81 and release-v1.18.82 there were 1 commits, 1 of them substantive:
This project publishes no release notes. Between release-v1.18.81 and release-v1.18.82 there were 1 commits, 1 of them substantive:
Nothing published for this version
Nothing published for this version
Nothing published for this version
One column per month.