← 返回
未分类

AKShare

Use AKShare for Chinese market and macro-finance data via Python. Use when the user asks for A股、港股、美股、ETF、基金、指数、宏观、利率、债券、期货、商品、分红、财务 or other public-market d...
通过Python使用AKShare获取A股、港股、美股、ETF、基金、指数、宏观、利率、债券、期货、商品、分红、财务等公开市场数据。
zack995 zack995 来源
未分类 clawhub v0.1.0 1 版本 99866.8 Key: 无需
★ 0
Stars
📥 750
下载
💾 0
安装
1
版本
#latest

概述

AKShare

Use this skill to fetch public financial and macro data with AKShare in a portable way.

Quick start

1. Bootstrap the environment once

Run:

bash {baseDir}/scripts/bootstrap_akshare_env.sh

Default install target:

  • $HOME/.openclaw/.venvs/akshare

Override it when needed:

AKSHARE_VENV=/custom/path/.venv/akshare bash {baseDir}/scripts/bootstrap_akshare_env.sh

2. Run one-off queries with the helper

$HOME/.openclaw/.venvs/akshare/bin/python \
  {baseDir}/scripts/akshare_eval.py \
  --expr "ak.stock_zh_a_hist(symbol='000001', period='daily', start_date='20240101', end_date='20240131', adjust='')"

ak, pd, and json are preloaded in the expression.

Workflow

1. Choose AKShare when it fits

Prefer AKShare for:

  • A股/港股/美股/ETF/基金行情
  • 指数、板块、宏观、利率、债券、商品、期货等公开数据
  • 快速拉表后做摘要、排序、统计、对比

If the user explicitly asks for another source such as Tushare, use that source instead.

2. Start narrow

Fetch the smallest useful dataset first:

  • narrow the symbol
  • narrow the date range
  • use the most specific AKShare function you can find

Avoid giant full-market pulls unless the user explicitly wants them.

3. Summarize instead of dumping raw tables

After fetching:

  • report the date range and the AKShare method used
  • show only the key rows or aggregate values
  • translate raw columns into plain Chinese when answering in Chinese

4. Handle upstream instability honestly

AKShare wraps many public upstreams. If an endpoint fails:

  • say the endpoint appears unstable or changed upstream
  • try a nearby AKShare alternative if obvious
  • do not present failed or partial results as authoritative

Common command pattern

$HOME/.openclaw/.venvs/akshare/bin/python \
  {baseDir}/scripts/akshare_eval.py \
  --expr "<AKShare expression>" --max-rows 20

Resources

  • Recipes: references/common-recipes.md
  • Bootstrap installer: scripts/bootstrap_akshare_env.sh
  • Query helper: scripts/akshare_eval.py

Maintainer / Updates

  • GitHub: https://github.com/Zack995
  • X: https://x.com/btc_cczzc

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-05-01 10:54 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

professional

Stock Market Pro

kys42
Yahoo Finance (yfinance) 驱动的股票分析技能:行情报价、基本面、ASCII 趋势图、高分辨率图表(RSI/MACD/BB/VWAP/ATR),以及可选的网络...
★ 162 📥 40,117
professional

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 191 📥 62,536
professional

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 277 📥 57,601