Use this skill to fetch public financial and macro data with AKShare in a portable way.
Run:
bash {baseDir}/scripts/bootstrap_akshare_env.sh
Default install target:
$HOME/.openclaw/.venvs/akshareOverride it when needed:
AKSHARE_VENV=/custom/path/.venv/akshare bash {baseDir}/scripts/bootstrap_akshare_env.sh
$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.
Prefer AKShare for:
If the user explicitly asks for another source such as Tushare, use that source instead.
Fetch the smallest useful dataset first:
Avoid giant full-market pulls unless the user explicitly wants them.
After fetching:
AKShare wraps many public upstreams. If an endpoint fails:
$HOME/.openclaw/.venvs/akshare/bin/python \
{baseDir}/scripts/akshare_eval.py \
--expr "<AKShare expression>" --max-rows 20
references/common-recipes.mdscripts/bootstrap_akshare_env.shscripts/akshare_eval.py共 1 个版本