端点清单
分组:免费 6 个 · 付费 22 个。含参数说明与 curl / Python / JS 示例。
本页由 /openapi.json 自动生成 (来源 live · 2026-09-16 04:44:17)—— 与 API 永远同步。
免费6 个
/v1/health服务健康检查检查服务状态与数据通道是否正常(go_cli / npm_cli 都为 true 表示两个数据 CLI 就绪)。
curl "https://api.ashareapi.com/v1/health?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/health",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/health?key=YOUR_KEY",
);
console.log(await r.json());/v1/quote实时行情快照A股/港股/美股实时行情:现价、开高低、成交量、成交额、换手率。用户问『某股票现在多少钱/什么价/现价』时用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码,带市场前缀:sh600667(沪)/ sz000001(深)/ hk00700(港)/ usAAPL(美) |
curl "https://api.ashareapi.com/v1/quote?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/quote",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/quote?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/klineK线(日/周/月)历史 K 线数据。用户问『走势/最近表现/历史K线/趋势』时用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
| period | string | 否 | 周期:day 日线 / week 周线 / month 月线 |
| count | integer | 否 | 返回条数,默认 30 |
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/kline?code=sh600667&period=day&key=YOUR_KEY",
);
console.log(await r.json());/v1/hot热搜榜全市场热搜榜(A股/美股/ETF 关注度排名 + 涨跌幅)。用户问『什么股票热门/大家在看什么/热度榜』时用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| limit | integer | 否 | 返回条数,默认 30 |
curl "https://api.ashareapi.com/v1/hot?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/hot",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/hot?limit=10&key=YOUR_KEY",
);
console.log(await r.json());/v1/market-overview市场总览(大盘画像)市场整体画像。type=summary 总评画像 / trade 收盘 / interval 多周期 / technical 大盘技术 / updown 涨跌分布 / margin 两融 / valuation 估值分位 / rotation 风格轮动。用户问『今天市场怎么样/大盘情况/市场环境』时用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 否 | 类型:summary/trade/interval/technical/updown/margin/valuation/rotation |
curl "https://api.ashareapi.com/v1/market-overview?type=institution&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-overview",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/market-overview?type=institution&key=YOUR_KEY",
);
console.log(await r.json());/v1/changedist涨跌分布(市场广度)全市场涨跌家数、涨跌停家数、成交额——衡量市场广度与情绪。
curl "https://api.ashareapi.com/v1/changedist?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/changedist",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/changedist?key=YOUR_KEY",
);
console.log(await r.json());付费22 个
/v1/finance财务报表财务报表三件套:利润表 / 资产负债表 / 现金流量表(多期)。用户问『营收/净利润/毛利率/负债/财务数据』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
| num | integer | 否 | 返回期数,默认 4 期 |
curl "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/finance",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY",
);
console.log(await r.json());/v1/fund个股资金+龙虎榜+大宗+两融(综合)一个接口拿全交易面:主力资金(当日/5/10/20 日净流入 + 全市场排名)、龙虎榜(上榜原因/买卖总额/营业部明细)、大宗交易、融资融券。用户问『主力资金/资金流/龙虎榜/机构动向』时优先用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/technical技术指标技术指标全家桶:MA / MACD / KDJ / RSI / BOLL。用户问『技术面/指标/金叉死叉/超买超卖』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/technical?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/technical",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/technical?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/shareholder股东研究十大股东 / 股东户数(筹码集中度)/ 机构持仓。用户问『谁在持有/股东变化/筹码集中/机构持仓』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/shareholder",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/chip筹码分布/成本筹码分布与持仓成本分析(获利盘/套牢盘比例)。用户问『筹码/成本分布/套牢』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/chip?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chip",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/chip?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/events个股事件标签(42 类)个股事件总览:大宗交易/龙虎榜/回购/定增/分红/业绩/解禁等 42 类事件标签。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/events",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/lhb龙虎榜分榜龙虎榜按类型分榜:institution 机构榜(机构买入/净买/机构数)/ hotmoney 游资榜 / activeseat 活跃席位。用户问『龙虎榜/机构买了什么/游资动向』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 否 | 榜单类型:institution 机构 / hotmoney 游资 / activeseat 活跃席位 |
| date | string | 否 | 日期 YYYY-MM-DD(留空=最近交易日) |
curl "https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY",
);
console.log(await r.json());/v1/screen因子选股(量化筛股)按因子表达式筛选全市场股票。expr 是多因子交集,例如:intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])。常用因子:PE_TTM/PB/PS_TTM/TotalMV/DividendRatioTTM(估值)· ROE/ROETTM/ROIC/GrossIncomeRatioTTM/NetProfitRatioTTM(盈利)· OperatingRevenueGrowRate/NPParentCompanyYOY(成长)· CurrentRatio/DebtAssetsRatio/NAPS(负债)· NetOperateCashFlowTTM(现金流)。用户问『筛选股票/符合条件的股票/低估高ROE』时用这个。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| expr | string | 否 | 因子表达式,如 intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15]) |
| preset | string | 否 | 预设名(与 expr 二选一):LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个 |
| limit | integer | 否 | 返回条数,默认 20 |
| orderby | string | 否 | 排序字段(如 ROETTM) |
| desc | boolean | 否 | True 降序 / False 升序 |
| market | string | 否 | 市场:hs 沪深 / hk 港股 / us 美股(留空=沪深) |
curl "https://api.ashareapi.com/v1/screen?expr=intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/screen",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/screen?expr=intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])&key=YOUR_KEY",
);
console.log(await r.json());/v1/sector板块行情榜行业/概念/地域板块涨幅榜 + 领涨股。用户问『哪些板块在涨/板块轮动/行业热度』时用。
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/sector",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/sector?key=YOUR_KEY",
);
console.log(await r.json());/v1/sector-valuation板块估值(含历史百分位)申万板块 PE/PB/PS/PCF + 股息率 + 历史百分位。code 形如 pt01801780。用户问『某板块贵不贵/估值分位』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 申万板块代码:pt01801780 |
curl "https://api.ashareapi.com/v1/sector-valuation?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/sector-valuation",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/sector-valuation?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/macro宏观数据全球宏观指标:GDP/CPI/PMI/LPR/国债收益率/财政等。用户问『宏观/经济数据/利率/LPR/CPI』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| region | string | 否 | 地区:cn 中国 / us 美国 / jp 日本 / eu 欧洲 / hk 香港 |
| names | string | 否 | 指标短名(如 cn_gdp / cn_cpi_ppi / cn_lpr / us_inflation);留空=该地区全套 |
curl "https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/macro",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY",
);
console.log(await r.json());/v1/bond可转债条款可转债完整条款:溢价率、转股价值、双低值、强赎触发价、回售触发价、转股价、正股、到期日、信用评级。code 形如 sh113052。用户问『转债条款/强赎/双低/溢价』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 可转债代码:sh113052 / sz123138 |
curl "https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bond",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/etfETF 概览ETF 行情/规模/溢折率/资金流。code 形如 sh510300。用户问『ETF』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | ETF 代码:sh510300 |
curl "https://api.ashareapi.com/v1/etf?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/etf",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/etf?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/ipo新股日历新股发行/申购/中签/上市日历。用户问『新股/打新/IPO』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| days | integer | 否 | 查询天数,默认 15 |
curl "https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/ipo",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY",
);
console.log(await r.json());/v1/dividend分红送转分红送转历史(每股分红/送股/除权日)。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
| years | integer | 否 | 年数,默认 3 |
curl "https://api.ashareapi.com/v1/dividend?code=sh600667&years=3&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/dividend",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/dividend?code=sh600667&years=3&key=YOUR_KEY",
);
console.log(await r.json());/v1/dehydrated脱水研报券商研报脱水摘要。用户问『研报/机构观点/券商怎么说』时用。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| mode | string | 否 | list 列表 / detail 详情 |
| symbol | string | 否 | 股票代码(detail 时用) |
| limit | integer | 否 | 条数,默认 10 |
curl "https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/dehydrated",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY",
);
console.log(await r.json());/v1/profile公司简况公司基本信息:上市日期、主营业务、所属行业。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 是 | 股票代码:sh600667 |
curl "https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/profile",
params={"key": "YOUR_KEY", "code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/search股票搜索(模糊词消歧)按名称/代码搜索股票、基金、板块。用户只给名称时**先用这个确认代码**。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| q | string | 是 | 关键词:'太极实业' 或 '600667' |
curl "https://api.ashareapi.com/v1/search?q=太极实业&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/search",
params={"key": "YOUR_KEY", "q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/search?q=太极实业&key=YOUR_KEY",
);
console.log(await r.json());/v1/calendar财经日历财经事件日历(宏观数据发布、重要事件排期)。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| date | string | 否 | 日期 YYYY-MM-DD(留空=最近) |
| limit | integer | 否 | 条数,默认 20 |
curl "https://api.ashareapi.com/v1/calendar?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/calendar",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/calendar?date=2026-09-16&key=YOUR_KEY",
);
console.log(await r.json());/v1/margin-trade融资融券个股融资融券明细:融资余额、买入、偿还、融券。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 否 | 股票代码:sh600667 |
| date | string | 否 | 日期 YYYY-MM-DD(留空=最近) |
curl "https://api.ashareapi.com/v1/margin-trade?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/margin-trade",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/margin-trade?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/block-trade大宗交易大宗交易记录:成交价、折溢价、成交量、买卖方营业部。
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| code | string | 否 | 股票代码:sh600667 |
| date | string | 否 | 日期 YYYY-MM-DD(留空=最近) |
curl "https://api.ashareapi.com/v1/block-trade?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/block-trade",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/block-trade?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());/v1/usage查询用量与额度查当前 Key 的今日调用次数、所在档位与每日额度。
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/usage",
params={"key": "YOUR_KEY"},
timeout=30,
)
print(r.json())const r = await fetch(
"https://api.ashareapi.com/v1/usage?key=YOUR_KEY",
);
console.log(await r.json());免费端点无需 Key 即可试用;付费端点需要 Key(见定价)。