端点清单
分组:免费 10 个 · 付费 85 个。含参数说明与 curl / Python / JS 示例。
/openapi.json · live · 2026-10-31
免费10个
⭐ 给 OpenAI SDK / Anthropic SDK / 通用客户端的 model list。
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/models"import requests
r = requests.get(
"https://api.ashareapi.com/v1/models",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/models");
console.log(await r.json());检查服务状态与数据通道是否可用(data_ready=true 表示能正常取数)。数据通道状态随时可查
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/health"import requests
r = requests.get(
"https://api.ashareapi.com/v1/health",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/health");
console.log(await r.json());匿名请求超限(429)时也会直接返回同一份挑战。解出 nonce 后带 X-PoW: <challenge>.<nonce> 请求,匿名配额从 5 次/分提升到 15 次/分。⚠️ 只提升每分钟次数,不提升每日条数(匿名每日最多取 10 万条)。付费 Key 用户无需使用。
difficultyinteger# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/challenge?difficulty=0"import requests
r = requests.get(
"https://api.ashareapi.com/v1/challenge",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/challenge?difficulty=0");
console.log(await r.json());A股/港股/美股实时行情(轻量 8 字段):现价、开高低、成交量、成交额、换手率。用户问『某股票现在多少钱/什么价/现价』时用这个。⚠️ 数据为当日盘中滚动更新(约每分钟刷新);取现价用 data[0]。⚠️ 免费 / 匿名档按 5 分钟刷新(保障服务稳定性);付费档实时(每次取此刻最新)。⚠️ data 是数组(默认 30 条日线,data[0] 为最新)。⚠️ 换手率的字段名是 turnover(单位 %)—— 与 /v1/snapshot 同名同值(sz000001 两者均 0.54)。⚠️ 2026-09-26 改名:该字段此前叫 exchange(数据源历史命名,极易被误读为「交易所」)—— 已统一为 turnover;如需兼容旧代码,读 turnover 即可。⚠️ 不含估值 / 市值 —— 要这些字段用 /v1/snapshot(35 字段,pro 档,仅 A 股)。⚠️ code 支持逗号批量(多标的)—— 但匿名单次最多 5 只标的(付费不限)。
⭐ 美股三大指数也能查:道指 usDJI · 纳指 usIXIC · 标普500 usINX。⚠️ 标普 500 的代码是 usINX(不是常见的 usSPX)。⚠️ volume 单位是「手」(1 手 = 100 股),amount 单位是元 —— 与 /v1/kline-full、/v1/market-kline 的「股」相差 100 倍,跨端点对比请先统一单位。
codestring是# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/quote?code=sh600667"import requests
r = requests.get(
"https://api.ashareapi.com/v1/quote",
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/quote?code=sh600667");
console.log(await r.json());历史 K 线数据。用户问『走势/最近表现/历史K线/趋势/分时』时用这个。周期:day 日线(默认)/ week 周线 / month 月线 / season 季线 / year 年线 / m1 m5 m15 m30 m60 m120 分钟线。日期范围:start + end(YYYY-MM-DD),仅 day 与分钟线支持(周/月/季/年线用 count 取条数,1212 条已覆盖 20+ 年月线;港股 / 美股 不提供日期范围 —— 原因是同一标的在不同数据通道上的复权口径不同,带范围会与不带范围给出不同的价格口径;请用 count 取最近 N 条)。⚠️ 换手率字段名是 turnover(单位 %)—— 与 /v1/quote、/v1/snapshot 同名同值(2026-09-26 由 exchange 改名)。⚠️ 收盘价的字段名是 last(不是 close);返回按日期降序 = 最新一条在 data[0](data[-1] 是最早),算涨跌幅时请勿当成升序。8 列字段(恒定,不随参数变化):date / open / last(收盘) / high / low / volume / amount / turnover(换手%)。⚠️ volume 单位是「手」(1 手 = 100 股),amount 单位是元 —— 与 /v1/kline-full、/v1/market-kline 的「股」相差 100 倍。⚠️ 代码可传带前缀(sh600519)或裸 6 位(600519,自动补市场前缀);⚠️ 唯一歧义是 000001(上证指数 vs 平安银行,按深市处理)—— 指数请显式传 sh000001。⚠️ 价格口径固定为前复权(除权除息日不跳空;本端点没有 fq 参数)—— 不要再自己复权(会二次复权)。分钟线不复权(数据源对分钟级数据固定给原始价)。⭐ 要原始价(nofq)/ 后复权(hfq) ⇒ 用 /v1/kline-batch(专业版 ¥99)或 /v1/kline-full(标准版 ¥29.9,仅 A 股)—— 复权口径是付费档能力,免费端点只给前复权以保证「同一个 code 永远同一个价格口径」。⚠️ 分钟线覆盖近 1 个月(窗口起点约为上个自然月月初;港股 / 美股窗口更短,实测只覆盖最近几个交易日),超范围返回空结果。⚠️ 分钟线需 standard(¥29.9)及以上档位;日 / 周 / 月 / 季 / 年线免费(免费 / 匿名档按 5 分钟刷新;付费档实时)。⚠️ code 支持逗号批量(一次取多只,如 code=sh600000,sz000001)—— 但 匿名单次最多 5 只标的(付费不限);且单次预估总条数(标的数 × count)上限 6 万条(防单请求过大,正常用户撞不到)。⚠️ 标的边界:分钟线支持 A股 / 指数 / 板块 / ETF / 可转债 / 港股 / 美股(北交所 / 期货 / 外汇 / 美股指数无分钟线);美股指数 usDJI(道指)/ usIXIC(纳指) / usINX(标普500,⛔ 不是 usSPX)仅支持 day;期货 / 外汇只有 day / week / month(无季 / 年线)。⚠️ 字段固定 8 列(date open last high low volume amount turnover)—— 不随周期/范围变化。
codestring是periodstringcountstringstartstringendstring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline",
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline?code=sh600667&period=day");
console.log(await r.json());⭐ 产品文档检索:字段单位、口径说明、常见误用、跨市场差异 —— 当你(agent)不确定某字段含义/单位/口径时先查这里,比猜更准。
qstringslugstringlangstring# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/wiki?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"import requests
r = requests.get(
"https://api.ashareapi.com/v1/wiki",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/wiki?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A");
console.log(await r.json());关注度排名(谁在被关注,⛔ 不是「谁在涨」)。用户问『什么股票热门/大家在看什么/热度榜/热门板块/热文』时用这个。
limitintegertypestring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/hot?limit=10"import requests
r = requests.get(
"https://api.ashareapi.com/v1/hot",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/hot?limit=10");
console.log(await r.json());市场整体画像。type=summary 总评画像 / trade 收盘 / interval 多周期 / technical 大盘技术 / margin 两融 / valuation 估值分位 / rotation 风格轮动。用户问『今天市场怎么样/大盘情况/市场环境/风格轮动/估值分位』时用这个。⚠️ type=updown(涨跌分布)是 T-1 口径(返回里会标数据日期,可能滞后一个交易日)—— 要当期涨跌家数/涨停家数/市场广度,请用 /v1/changedist(两者数值会不同)。
typestring# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/market-overview?type=institution"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-overview",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-overview?type=institution");
console.log(await r.json());全市场涨跌家数、涨跌停家数、停牌、成交额与涨跌幅区间分布——衡量市场广度与情绪(当期口径)。这是市场广度的推荐入口:不要用 /v1/market-overview?type=updown 取同一数据(那是 T-1 口径,数值会不一致)。
# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/changedist"import requests
r = requests.get(
"https://api.ashareapi.com/v1/changedist",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/changedist");
console.log(await r.json());A 股交易日历:逐个日期给出是否开市,以及该日是不是本周/本月/本季/本年的最后一个交易日(做结算日、到期日、调仓日的时候要用)。
datestringstartstringendstringyearstringtrading_onlybooleanlimitintegeroffsetinteger# 免费端点:无需 API Key(匿名即可调用)
curl "https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16"import requests
r = requests.get(
"https://api.ashareapi.com/v1/trade-calendar",
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16");
console.log(await r.json());付费85个
⭐ 自然语言 → 带证据链的结构化候选,供你自己编排。我们不生成答案,只给「结构化结果 + 证据元数据」。
qstring是scopestringashare(自有数据:资金流/行情/龙虎榜/大宗/两融)· notice,news,report(公告/资讯/研报原文)· web(网页检索,需 X-LLM-Key)· wechat(微信公众号,同上,等价于 web + site:mp.weixin.qq.com)。⚠️ 显式传 web/wechat 时只在该通道内找,取不到会如实 ok:false(⛔ 不会退回别的通道凑答案);⛔ 暂不支持:a2b(浏览器渲染)· xhs · local(本地文档库)depthstringmax_resultsintegerclarifybooleanclaimstringreplaybooleanauthority_minnumber0.6 只要官方一手来源;默认 0(不过滤)recencystring7d / 24h / 30m。⚠️ 只影响裁决,不过滤结果 —— 超出窗口的照常返回,但 verification 里会标 unverified(我们的定位是把"哪些验证了、哪些没有"暴露出来)。不传 ⇒ 不判时效。# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-search",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 开箱即用问答:我们取数 + 生成一段带引用的答案,你不用自己编排。
qstring是scopestringmax_resultsintegerrecencystring7d / 24h# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-ask",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-ask?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 给 Claude Code / Anthropic SDK 用的 Messages 协议接入点。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/messages"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/messages?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/messages",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/messages", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());把自然语言条件交给选股员(scanner Agent),返回候选池、引用与工具轨迹。
qstring是# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/scanner",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/scanner?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 给 OpenAI SDK / Cherry Studio / ChatBox / OpenWebUI 等客户端用。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chat/completions"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chat/completions?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chat/completions",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chat/completions", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ OpenAI 新一代 Responses 协议:input 支持字符串或消息数组,instructions 由我们丢弃(铁律不可覆盖)。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/responses"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/responses?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/responses",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/responses", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 深度研究:提交任务后拿 task_id,隔一会儿查结果。
qstring是depthstringfast / standard / deep# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/agent-research",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/agent-research?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&depth=standard", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ A股全历史日线(一次拿到全部日线,不受数据源单次条数限制)(实测约 2465 根,而 /v1/kline 上限 1212 根)。适合:长周期回测 / 因子研究 / 复权精确计算。
codestring是fqstringstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline-full",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline-full?code=sh600667&fq=qfq", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一次请求返回全市场(5000+ 只 A 股)在某一交易日的日线 —— 适合「每日增量更新全市场」,替代逐只调用(省 5000+ 次请求)。
datestring是limitintegeroffsetintegercodesstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-kline",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"date": "2026-09-16"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-kline?date=2026-09-16&limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 量化回测:对给定标的或组合,按内置策略跑历史回测,返回收益/风险指标(可选净值曲线)。
modestringstrategystringcodestringstartstringendstringinitial_cashnumberweightingstringinclude_equityboolean# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/backtest?mode=single"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/backtest?mode=single&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/backtest",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/backtest?mode=single", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 量化策略清单:列出我们内置的全部策略(单标的择时 + 组合选股),含每个策略的参数白名单(名称/类型/最小/最大/默认)。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/strategies"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/strategies?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/strategies",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/strategies", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());查当前 Key 的 IP 白名单 —— 只有名单内的 IP 能调这个 Key。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/ip-whitelist"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/ip-whitelist?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/ip-whitelist",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/ip-whitelist", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 批量回测:一次跑多只标的 × 多个策略,返回对比矩阵(谁表现最好)。
codesstring是strategiesstringstartstringendstringinitial_cashnumber# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/backtest-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/backtest-batch?codes=&strategies=buy_hold", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 量化因子库 / 筛选能力字典:列出全部可用于筛选的因子与入口。
categorystringkindstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/factors?category="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/factors?category=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/factors",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/factors?category=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 量化方法论库:一套套「怎么判断市场」的可复用流程 —— 每条都写清判据、阶段、应对,以及它能帮你避开什么亏损。
categorystringidstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/playbooks?category="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/playbooks?category=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/playbooks",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/playbooks?category=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());分时数据:盘中每分钟的价格与累计成交量。用户问『今日分时 / 盘中走势 / 分钟级走势 / 今天怎么走的』时用这个。
codestring是daysinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/minute?code=sh600667&days=15"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/minute?code=sh600667&days=15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/minute",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/minute?code=sh600667&days=15", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());个股/指数/ETF/板块/可转债的财经资讯。不传 id ⇒ 列表(code 必填,返回标题 + 来源 + 时间);传 id ⇒ ⭐ 该条完整正文。用户问『这股票最近有什么新闻/消息面/这条新闻讲了什么』时用这个。
codestringidstringlimitintegertypestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/news?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/news?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/news",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/news?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());上市公司公告。不传 id ⇒ 列表(code 必填,支持 type / limit / offset 翻页,可回溯约 16 年 —— 实测茅台 929 条到 2010 年);传 id ⇒ 该公告详情。用户问『公告/披露/半年度报告/年报在哪』时用这个。
codestringidstringtypestringlimitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/notice?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/notice?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/notice",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/notice?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());财务报表三件套:利润表 / 资产负债表 / 现金流量表(多期,最近 N 期)。用户问『营收/净利润/毛利率/负债/财务数据』时用。
codestring是numinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/finance?code=sh600667&num=4"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/finance?code=sh600667&num=4", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只的三大报表(利润表 / 资产负债表 / 现金流量表),逐只标明成功与否 —— 给量化选股后的批量财务筛选(营收/净利/ROE/负债率/现金流)用。
codesstring是periodsintegertypestringfieldsstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/finance-batch?codes=&periods=4"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/finance-batch?codes=&periods=4&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/finance-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/finance-batch?codes=&periods=4", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只的技术指标(MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV / VR / BBI / TRIX / DPO / PSY / ENE / CCI …共 55 项),逐只标明成功与否 —— 给量化做全市场批量技术面筛选用。
codesstring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/technical-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/technical-batch?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一个接口拿全交易面:主力资金(当日/5/10/20 日净流入 + 全市场排名)、龙虎榜(上榜原因/买卖总额/营业部明细)、大宗交易、融资融券。用户问『主力资金/资金流/龙虎榜/机构动向』时优先用这个。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只股票的资金流(主力资金 + 龙虎榜 + 大宗 + 融资融券),每只一条记录。给量化/批量研究用 —— 一次扫一个行业或自选池,不必一只一只调 /v1/fund。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只股票的行情,逐只标明成功与否 —— 给量化/批量研究用。
codesstring是periodstringcountintegerstartstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/quote-batch?codes=&period=day"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/quote-batch?codes=&period=day&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/quote-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/quote-batch?codes=&period=day", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只股票的 K 线(多只 × 同一段时间),逐只标明成功与否 —— 给量化/批量研究用。
codesstring是periodstringcountintegerstartstringendstringfqstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/kline-batch?codes=&period=day"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/kline-batch?codes=&period=day&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/kline-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/kline-batch?codes=&period=day", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只股票的完整画像(35+ 字段:价格/盘口五档/PE·PB/市值/股本/涨停跌停价/量比/振幅/涨速/外盘内盘),逐只标明成功与否。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/snapshot-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/snapshot-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/snapshot-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/snapshot-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只公司的简况(上市日期 / 主营业务 / 所属行业 / 官网 / 注册资本 / 董事长 / 联系方式),逐只标明成功与否 —— 给量化选股后的批量画像、行业归类用。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/profile-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/profile-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/profile-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/profile-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只股票的筹码分布与持仓成本(获利盘比例 / 平均成本 / 90% 与 70% 集中度),逐只标明成功与否 —— 给量化筛股后判断抛压用。
codesstring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chip-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chip-batch?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());技术指标全家桶:MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV 等共 55 项。用户问『技术面/指标/金叉死叉/超买超卖』时用。date 可回看历史(YYYY-MM-DD,缺省=最新);只有日线口径。
codestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/technical",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/technical?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());股东研究(多段返回)。用户问『谁在持有/股东变化/筹码集中/机构持仓』时用。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/shareholder?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/shareholder",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/shareholder?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 一次拿多只的股东研究(十大股东 / 十大流通股东 / 股东户数统计),逐只标明成功与否 —— 给量化选股后的批量『谁在持有、股权集中度如何』用。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/shareholder-batch?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/shareholder-batch?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/shareholder-batch",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/shareholder-batch?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());筹码分布与持仓成本(套牢盘/获利盘比例,判断抛压)。返回:筹码/成本分布/集中度/时段。date 可回看历史(YYYY-MM-DD,缺省=最新)。⚠️ 历史仅保留约近 1 年(实测 2025-10-24 起;更早返回空 ⇒ ok:false 且不扣次数)。⚠️ 非交易日/未来日期会自动回退到最近交易日 —— 返回行的 date 才是实际日期,以它为准。⚠️ 支持沪深 A 股与 ETF(实测 sh510300 回平均成本 4.39 / 获利比例 13.47%;ETF 的「筹码」口径与个股相同);港股 / 美股不支持。代码可传 sh600667 或裸 6 位 600667。
codestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/chip",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/chip?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());秒级快照:买一~买五 / 卖一~卖五的价格与挂单量(手),含现价/涨跌/数据时间。字段命名对齐 Tushare 惯例:b1_p/b1_v ~ b5_p/b5_v = 买档价格/量,a1_p/a1_v ~ a5_p/a5_v = 卖档(扁平列,pandas 直接取 df['b1_p'])。用途:看封单强度、买卖压力、盘中支撑压力位。⚠️ 盘中才有意义(收盘后为当日最后快照);数据约 10 秒刷新一次。⚠️ 量单位是手(×100 = 股);跌停时买档全 0 / 涨停时卖档全 0(正常现象)。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/orderbook?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/orderbook?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/orderbook",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/orderbook?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一只股票的完整画像:价格 + 盘口(买五卖五+委差)+ 估值(PE TTM/动/静 + PB) + 市值(流通/总)+ 股本(流通/总)+ 打板(涨停/跌停价 + 量比 + 振幅 + 涨速) + 标识(证券类型/股票状态/币种)+ 外盘/内盘。⚠️ 与 /v1/quote 的分工:quote 轻(8 字段)· 走官方通道 · 免费;本端点全(35 字段)· pro 档。只要现价用 quote 更轻(字段少、响应快)。⚠️ 仅 A 股(港股/美股字段布局不同,请用 /v1/quote)——传其他市场返回空,不返回错数据。⚠️ 计费 = 次数:本端点 1 次拿全 35 字段——要估值+市值+股本+涨停价多项时,比分别调 quote/valuation/orderbook 更省次数。⚠️ 单位:volume 手 · amount 万元 · 市值 亿元 · 股本 股 · 比率/涨幅 百分数。(字段含义见 https://ashareapi.com/docs/)
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/snapshot?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/snapshot?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/snapshot",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/snapshot?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());短线监管异动 / 偏离值:触发「严重异动」、「10日100% 偏离」、异动盯盘名单、严重异动提醒。这是短线风控的关键信号(个股因连续大涨/大跌被交易所或数据方标记异动)。
modestringdatestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/abnormal?mode=deviation"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/abnormal?mode=deviation&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/abnormal",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/abnormal?mode=deviation", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());短线复盘(涨停结构):看今天钱在哪些题材、梯队结构长什么样。
modestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/review?mode=board"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/review?mode=board&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/review",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/review?mode=board", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());短线打板:当日涨停个股,含涨停原因与资金面。
modestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/limit-up?mode=limit"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/limit-up?mode=limit&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/limit-up",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/limit-up?mode=limit", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());短线集合竞价:个股 9:15–9:25 集合竞价数据,含「竞价触及涨停 / 触及跌停」判定。
modestringcodestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/auction",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());个股事件总览:大宗交易/龙虎榜/回购/定增/分红/业绩/解禁等 42 类事件标签。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/events?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/events",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/events?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());单股大单资金分时:每 1 分钟一个点,net = 该分钟大单净额(元),正数=大单净买入、负数=净卖出。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());逐笔大单成交:单只票当日每一笔成交额 ≥ 阈值的大单,并按主动 / 被动 × 买 / 卖四方向标注。
codestring是moneyintegerlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-flow",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-flow?code=sh600667&money=0", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());大单挂单明细:当日委托量或委托金额超过阈值的挂单,逐笔列出,并带涨停标记与撤单标记。
codestring是volintegerturintegerlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-queue",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-queue?code=sh600667&vol=500", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());单股逐日大单净额:往回最多 100 个交易日,每天一个值,net = 当日大单净额(元),正数=大单净买入、负数=净卖出。
codestring是limitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-history",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-history?code=sh600667&limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());分钟级主力资金四分解:把主买拆成主动买 + 被动买、主卖拆成主动卖 + 被动卖,每 1 分钟一行。
codestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-split",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-split?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());全市场主力资金排行榜:一次拿到全市场(约 5568 只)的主力买卖与净额,按 8 种维度排序,支持翻页和历史回看。
sortstringlimitintegeroffsetintegerdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bigorder-rank?sort=net_in"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bigorder-rank?sort=net_in&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bigorder-rank",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bigorder-rank?sort=net_in", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());龙虎榜营业部席位:某只票某次上榜的买卖席位明细(最多 10 个营业部),带游资标记。
codestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb-seats",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb-seats?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());全市场机构榜:某个交易日机构席位在龙虎榜上参与过的所有个股,一次拿完(实测单日 51 只),带机构买入额与所属风口板块。
datestringsortstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb-agency",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb-agency?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一句话看今天短线情绪冷不冷:破板率 + 最近 9 个交易日的赚钱效应序列。
datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/market-mood?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/market-mood?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/market-mood",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/market-mood?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());「这只票为什么涨停」的答案:每次涨停的完整原因文案 + 所属板块 + 当日是「日内龙几」。
codestring是datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/limit-reason",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/limit-reason?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());某天有哪些票涨停被砸开(炸板),带概念标签。
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/broken-board?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/broken-board?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/broken-board",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/broken-board?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());尾盘资金在抢哪些票:全市场约 292 只,带抢筹金额、题材、涨幅。
limitintegersortstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/tail-chase?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/tail-chase?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/tail-chase",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/tail-chase?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());外资(北向)在 A 股各板块的持仓:按季度公布,实测 20 个板块。
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/northbound?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/northbound?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/northbound",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/northbound?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());哪些题材今天在创百日新高:按题材汇总家数,实测 18 个题材。
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/new-high?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/new-high?date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/new-high",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/new-high?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());全市场财经快讯(财联社等来源),按时间倒序,每 1 分钟刷新一次缓存。用户问『今天有什么大消息 / 最新财经新闻 / 刚才发生了什么』用这个。
limitintegerindexinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/flash?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/flash?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/flash",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/flash?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一次查询,多源取证:同时检索巨潮公告(沪深两市,官方一手)与东方财富资讯,归一成同一张表,并把转载去重。
qstring是scopestringlimitinteger# 注:q / scope 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/evidence",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/evidence?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&scope=notice%2Cnews", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());全市场龙虎榜,按类型分 6 种榜:
all 全市场总榜(当日上榜股 · 净买/买卖额)/ institution 机构榜(机构数 / 机构买入 / 净买)/ activeseat 活跃席位(席位买入额 + 关联个股)/ winbuy 高胜率买入(净买额 / 胜率 / 席位明细)/ winseat 高胜率席位(席位胜率 + 关联个股)/ hotmoney 游资榜。
typestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/lhb?type=institution"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/lhb",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/lhb?type=institution", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());按条件筛出股票清单。五个模式,用 mode 选(默认 condition):
modestringlistbooleanexprstringpresetstringtypestringlimitintegeroffsetintegerorderbystringdescbooleandatestringstartstringendstringassetstringuniversestringmarketstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/screen?mode=condition"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/screen?mode=condition&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/screen",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/screen?mode=condition", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());行业/概念/地域板块涨幅榜 + 领涨股。用户问『哪些板块在涨/板块轮动/行业热度』时用。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/sector"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/sector",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/sector", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());A 股产业链数据(183 个产业链主题):mode=list 主题列表 · mode=graph&topic=超级电容 → 产业链图谱(关联个股 + 所属节点 + 产业链位置 上游/中游/下游)· mode=stock&code=sh600667 → 个股所属产业链(主题 / 节点 / 位置 / 关联度 / 业务描述)。用户问『产业链/上下游/某公司处于链上什么位置/这个主题有哪些公司』时用。
modestringtopicstringcodestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/industry-chain?mode=graph"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/industry-chain?mode=graph&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/industry-chain",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/industry-chain?mode=graph", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());申万板块 PE/PB/PS/PCF + 股息率 + 历史百分位。code 形如 pt01801780。用户问『某板块贵不贵/估值分位』时用。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/sector-valuation?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/sector-valuation?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 指数成分股全量清单(一次给全,不受条数上限):sh000300 返回 300 只,字段 code / name / IndexName。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/index-constituent?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/index-constituent?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/index-constituent",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/index-constituent?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());全球宏观指标:GDP/CPI/PMI/LPR/国债收益率/财政等。用户问『宏观/经济数据/利率/LPR/CPI』时用。
regionstringnamesstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/macro?region=cn"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/macro",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/macro?region=cn", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());当日停复牌清单:哪些票停牌、哪些复牌、停牌原因。用户问『今天哪些票停牌/复牌/停牌原因』时用。
marketstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/suspension?market=hs"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/suspension?market=hs&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/suspension",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/suspension?market=hs", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());公司股份回购记录。用户问『这家公司在回购吗/回购了多少/回购价多少』时用。
codestring是startstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/buyback?code=sh600667&start="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/buyback?code=sh600667&start=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/buyback",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/buyback?code=sh600667&start=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());⭐ 卖方一致预期:分析师目标价 + 未来年度/季度预测(EPS / 营收 / 净利润 / 预测 PE·PB·PS / 机构覆盖数)。用户问『机构怎么看这只票/目标价多少/明年利润预测/一致预期』时用。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/consensus?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/consensus?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/consensus",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/consensus?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());卖方机构评级:目标价(均值 / 最高 / 最低)+ 评级分布(买入 / 增持 / 中性 / 减持 / 卖出 + 覆盖机构数)+ 评级月度趋势(含最新一期)。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/rating?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/rating?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/rating",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/rating?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());业绩预约披露日:哪天披露财报(disclosureDate)+ 报告期(reportEndDate)+ 说明文案(disclosureDesc)。
codesstring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/disclosure?codes="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/disclosure?codes=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/disclosure",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/disclosure?codes=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());个股资金流向:主力/散户的买入、卖出、净额,以及均价与收盘价。
codestring是startstringendstring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-flow?code=sh600667&start="
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-flow?code=sh600667&start=&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-flow",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-flow?code=sh600667&start=", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());卖空数据:卖空股数 / 卖空金额 / 卖空比率(ShortShares / ShortAmount / ShortRatio)。
codestring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-short",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-short?code=sh600667&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());港股通南下资金持仓:持股数 / 持股比例 / 持股市值(季度口径)。
codesstring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/fund-south",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/fund-south?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());指数全量清单(1223 个):code / name。
limitintegeroffsetintegerdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/index-list?limit=10"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/index-list?limit=10&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/index-list",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/index-list?limit=10", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());股票评分(仅 A 股):基本面 / 技术 / 综合 / 资金 / 风险 五个维度,每维带周 / 月 / 季变动。
codesstring是datestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/score?codes=&date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/score?codes=&date=2026-09-16&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/score",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"codes": ""},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/score?codes=&date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());卖方研报:不传 id ⇒ 列表(研报标题 + 机构 + 评级 + 类型 + 时间);传 id ⇒ ⭐ 研报全文(Markdown:标题 + 日期/机构 + 正文含财务点评)。
codestringidstringid 字段取limitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/report?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/report?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/report",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/report?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());可转债完整条款:溢价率、转股价值、双低值、强赎触发价、回售触发价、转股价、正股、到期日、信用评级。code 形如 sh113052。用户问『转债条款/强赎/双低/溢价』时用。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/bond?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/bond",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/bond?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());ETF 行情/规模/溢折率/资金流。code 形如 sh510300。用户问『ETF』时用。kind 选子集:概览(默认,行情+规模+溢折率+资金流+回撤+估值) / 详情(基金要素+费率+份额) / 持仓(成分股及权重) / 净值(历史单位净值,4 位小数,须同时传 start+end;含 closePrice 可自算折溢价) / 公司(管理人+托管人+跟踪指数) / 持有人(户数+机构个人占比) / 财务(资产配置:股/债/商品/基金占比)。⚠️ 响应 data 是数据源排版文本;字段请取 structured(首表)或 tables(全部表) —— 详情/公司 是多表(含基金经理),只有 tables 能拿全。⚠️ 仅 ETF 代码:传个股代码返回 ok:false(不扣次数),不再给全 0 空壳 —— 代码不确定请先用 /v1/search 或 /v1/hot?type=etf 确认。⚠️ 代码可传裸 6 位 510300 或带前缀 sh510300,结果一致。⚠️ code 单次只接受 1 只 —— 传逗号(sh510300,sz159915)会返回 422。多只请分别请求,每只独立计次(本端点没有批量价,也不按批量计费)。⚠️ kind=概览 / kind=持仓 传 date(YYYY-MM-DD)可查历史快照:概览=那天的折溢价/规模/估值百分位;持仓=那天在手的重仓股(重仓股涨跌 + 申赎清单前 10,code 带市场前缀如 sh600519)。⚠️ 持仓不传 date 走的是另一条通道(单表 Top20 持仓,code 为裸 6 位)—— 两种形态都按段名/列名取,别按位置取。⚠️ 历史快照的两个边界(数据源行为,非我们的限制):未来日期会被按最近交易日返回(看响应里的 date 列自证,不要当成拿到了未来数据);上市前日期回全 0 且少 6 个回撤字段 ⇒ 会按空壳拦成 ok:false。⚠️ 要『全市场 ETF 清单/规模排行/主题池』不在这里 —— 用 /v1/screen?asset=etf(mode=ranking 9 类横截面指标 · mode=label 48 个主题池)。
codestring是kindstringstartstringendstringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/etf",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());新股发行/申购/中签/上市日历。用户问『新股/打新/IPO』时用。⚠️ 三市场覆盖:A 股 / 港股 / 美股(数据源 Markets 含三市场)。
daysinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/ipo?days=15"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/ipo",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/ipo?days=15", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());分红送转历史(每股分红/送股/除权日)。⚠️ 支持港股(代码形如 hk00700;实测返回 2 条)。⚠️ ETF 没有分红明细(数据源不提供,只有 /v1/etf?kind=概览 的 divTtm)。
codestring是yearsinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/dividend?code=sh600667&years=3"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/dividend?code=sh600667&years=3", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());券商研报脱水摘要。用户问『研报/机构观点/券商怎么说』时用。
modestringsymbolstringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/dehydrated?mode=list"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/dehydrated",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/dehydrated?mode=list", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());公司基本信息:上市日期、主营业务、所属行业。⚠️ ETF / 指数请改用 /v1/etf?kind=详情 或 /v1/quote —— 本端点对 ETF 只有 code/name/listedDate 有值,business/industry/sector/chairman 数据源本来就没有(不是取数失败,也不是 ETF 不存在);ETF 的 64 个字段在 /v1/etf?kind=详情。
codestring是# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/profile?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/profile",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"code": "sh600667"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/profile?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());按名称/代码搜索股票、基金、板块。用户只给名称时先用这个确认代码。⚠️ 覆盖 A 股 / 港股 / 美股(数据源 Markets 含三市场)⇒ hk00700、usAAPL 都能搜到;港股代码是 5 位(hk00700),与 A 股 6 位不同。
qstring是# 注:q 的值已做 URL 编码(含 [ ] 空格 等)
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/search",
headers={"Authorization": "Bearer YOUR_KEY"},
params={"q": "太极实业"},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/search?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());一次拿全 A 股约 5576 只的清单:代码、名称、市场、上市日期、行业、板块、发行价、注册资本。
marketstringindustrystringlimitintegeroffsetinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/stocks?market=hs"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/stocks?market=hs&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/stocks",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/stocks?market=hs", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());个股事件日历:分红派息 / 解禁 / 财报披露等公司事件排期(不是宏观数据日历——宏观请用 /v1/macro)。
datestringlimitinteger# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/calendar?date=2026-09-16"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/calendar?date=2026-09-16", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());个股融资融券明细:融资余额、买入、偿还、融券。code 必填(支持批量:sh600667,sz000651);缺 code 会返回明确的说明(不再静默空);未披露交易日的两融数据数据源会给出原因。⚠️ ETF 不在两融名单 —— 实测 sh510300 无论当日还是历史日(--date 2026-10-22)都恒回 NOT_DISCLOSED,文案说「尚未披露」但实际是该标的不属于两融标的,⛔ 别当数据延迟去重试。
codestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/margin-trade?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/margin-trade?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());大宗交易记录:成交价、折溢价、成交量、买卖方营业部。
codestringdatestring# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/block-trade?code=sh600667"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
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",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/block-trade?code=sh600667", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());查当前 Key 的今日调用次数、总量剩余(买断档)、到期时间(订阅档)与限流额度。
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/usage"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/usage",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/usage", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());免费端点无需 Key 即可试用;付费端点需要 Key(见定价)。