Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Provides free access to Chinese and global financial market data via the AkShare Python library.
Use this skill ↓74% 78%+4 ptsof test cases passed
Passed 18 of 23 test cases with the skill, and 17 of 23 without it.
I am constructing an equity panel dataset for five Chinese stocks (000001, 600519, 000858, 601318, 000333). When looping over multiple stock tickers to fetch financial statements and daily prices, missing financial records for some tickers often crash the script midway. How should error handling be structured inside the loop?
Uses ak.stock_financial_analysis_indicator for fetching financial statement indicators.
3 of 3 safety checks passed
AkShare is an open-source Python library providing free access to Chinese and global financial market data. It aggregates data from 50+ sources including Sina Finance, East Money, Tushare, Yahoo Finance, and central bank websites. No API key required for most functions. Essential for financial research, quantitative analysis, and economic studies involving Chinese market data.
pip install akshare --upgrade
# Verify
python -c "import akshare as ak; print(ak.__version__)"
import akshare as ak
import pandas as pd
# Real-time quotes for all A-shares
df = ak.stock_zh_a_spot_em()
print(df.head())
# Columns: 代码, 名称, 最新价, 涨跌幅, 成交量, 成交额, ...
# Historical daily data for a specific stock
df = ak.stock_zh_a_hist(symbol="000001", period="daily",
start_date="20200101", end_date="20261231")
print(df.columns)
# 日期, 开盘, 收盘, 最高, 最低, 成交量, 成交额, 振幅, 涨跌幅, 换手率
# Minute-level data
df = ak.stock_zh_a_hist_min_em(symbol="000001", period="5",
start_date="2026-01-01 09:30:00",
end_date="2026-03-10 15:00:00")
Skills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.