> Source: https://ashareapi.com/endpoints/  ·  Markdown version for LLMs / AI agents

共 95 个端点

# 端点清单
 分组：免费 10 个 · 付费 85 个。含参数说明与 curl / Python / JS 示例。
 `/openapi.json` · live · 2026-10-31

## 免费 10个
 GET `/v1/models` OpenAI / Anthropic 兼容模型清单（免费） [单独看这一页 →](/docs/endpoints/models)
 ⭐ 给 OpenAI SDK / Anthropic SDK / 通用客户端的 model list。
 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/models"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/models",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/models");
console.log(await r.json());
```

 GET `/v1/health` 服务健康检查 [单独看这一页 →](/docs/endpoints/health)
 检查服务状态与数据通道是否可用（data_ready=true 表示能正常取数）。数据通道状态随时可查
 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/health"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/health",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/health");
console.log(await r.json());
```

 GET `/v1/challenge` 获取 PoW 挑战（匿名提额用） [单独看这一页 →](/docs/endpoints/challenge)
 匿名请求超限（429）时也会直接返回同一份挑战。解出 nonce 后带 `X-PoW: . ` 请求，匿名配额从 5 次/分提升到 15 次/分。⚠️ 只提升**每分钟次数**，**不提升每日条数**（匿名每日最多取 10 万条）。付费 Key 用户无需使用。
 |
| | 参数 | 类型 | 必填 | 说明

| | difficulty | integer | 否 | 自定义难度（前导 0 位数），0=服务端默认

 `difficulty` integer
 自定义难度（前导 0 位数），0=服务端默认

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/challenge?difficulty=0"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/challenge",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/challenge?difficulty=0");
console.log(await r.json());
```

 GET `/v1/quote` 实时行情快照 [单独看这一页 →](/docs/endpoints/quote)
 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 倍，跨端点对比请先统一单位。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码，带市场前缀：sh600667（沪）/ sz000001（深）/ hk00700（港）/ usAAPL（美）。**支持逗号批量**（多标的），但匿名单次最多 5 只

 `code` string 是
 股票代码，带市场前缀：sh600667（沪）/ sz000001（深）/ hk00700（港）/ usAAPL（美）。**支持逗号批量**（多标的），但匿名单次最多 5 只

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/quote?code=sh600667"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/quote",
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/quote?code=sh600667");
console.log(await r.json());
```

 GET `/v1/kline` K线（分钟/日/周/月/季/年） [单独看这一页 →](/docs/endpoints/kline)
 历史 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`）—— 不随周期/范围变化。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667；同样支持 指数 sh000001 / 板块 pt01801081 / ETF sh510300 / 港股 hk00700 / 美股 usAAPL / 可转债 sz128136 / 期货 fuCN / 外汇 fxCNH。**支持逗号批量**（多标的），但匿名单次最多 5 只

| | period | string | 否 | 周期：day 日线（默认）/ week 周线 / month 月线 / season 季线 / year 年线 / m1 m5 m15 m30 m60 m120 分钟线

| | count | string | 否 | 返回条数上限。不带 start/end 时默认 30；带 start/end 时默认取满区间（1212）。最大 1212（免 Key 匿名最多 250；分钟线需 Key）。⚠️ 多标的时**总条数（标的数 × count）上限 6 万**

| | start | string | 否 | 起始日期 YYYY-MM-DD（仅 day 与分钟线；须与 end 配对；港股/美股/期货/外汇不支持）

| | end | string | 否 | 结束日期 YYYY-MM-DD（仅 day 与分钟线；须与 start 配对；港股/美股/期货/外汇不支持）

 `code` string 是
 股票代码：sh600667；同样支持 指数 sh000001 / 板块 pt01801081 / ETF sh510300 / 港股 hk00700 / 美股 usAAPL / 可转债 sz128136 / 期货 fuCN / 外汇 fxCNH。**支持逗号批量**（多标的），但匿名单次最多 5 只

 `period` string
 周期：day 日线（默认）/ week 周线 / month 月线 / season 季线 / year 年线 / m1 m5 m15 m30 m60 m120 分钟线

 `count` string
 返回条数上限。不带 start/end 时默认 30；带 start/end 时默认取满区间（1212）。最大 1212（免 Key 匿名最多 250；分钟线需 Key）。⚠️ 多标的时**总条数（标的数 × count）上限 6 万**

 `start` string
 起始日期 YYYY-MM-DD（仅 day 与分钟线；须与 end 配对；港股/美股/期货/外汇不支持）

 `end` string
 结束日期 YYYY-MM-DD（仅 day 与分钟线；须与 start 配对；港股/美股/期货/外汇不支持）

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/kline",
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/kline?code=sh600667&period=day");
console.log(await r.json());
```

 GET `/v1/wiki` 文档检索（字段 / 口径 / 常见误用） [单独看这一页 →](/docs/endpoints/wiki)
 ⭐ **产品文档检索**：字段单位、口径说明、常见误用、跨市场差异 —— **当你（agent）不确定某字段含义/单位/口径时先查这里，比猜更准**。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 否 | 关键词检索（如 '换手率单位' / 'code 格式'）；留空=返回目录

| | slug | string | 否 | 取某一篇全文（如 units / kline-fields）；留空=不用

| | lang | string | 否 | 语言：zh（默认）/ en

 `q` string
 关键词检索（如 '换手率单位' / 'code 格式'）；留空=返回目录

 `slug` string
 取某一篇全文（如 units / kline-fields）；留空=不用

 `lang` string
 语言：zh（默认）/ en

 curl

 ```
# 注：q 的值已做 URL 编码（含 [ ] 空格 等）
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/wiki?q=%E5%A4%AA%E6%9E%81%E5%AE%9E%E4%B8%9A"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/wiki",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/hot` 热度榜（5 类，字段各不相同） [单独看这一页 →](/docs/endpoints/hot)
 **关注度**排名（谁在被关注，⛔ 不是「谁在涨」）。用户问『什么股票热门/大家在看什么/热度榜/热门板块/热文』时用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | limit | integer | 否 | 返回条数，默认 30（榜单上限 50，超出按 50 返回）

| | type | string | 否 | stock 热搜股票 / wx 全市场热度（带 pv）/ news 热门文章 / sector 热门板块 / etf 热搜 ETF（⚠️ 5 类字段各不相同）

 `limit` integer
 返回条数，默认 30（榜单上限 50，超出按 50 返回）

 `type` string
 stock 热搜股票 / wx 全市场热度（带 pv）/ news 热门文章 / sector 热门板块 / etf 热搜 ETF（⚠️ 5 类字段各不相同）

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/hot?limit=10"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/hot",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/hot?limit=10");
console.log(await r.json());
```

 GET `/v1/market-overview` 市场总览（大盘画像） [单独看这一页 →](/docs/endpoints/market-overview)
 市场整体画像。type=summary 总评画像 / trade 收盘 / interval 多周期 / technical 大盘技术 / margin 两融 / valuation 估值分位 / rotation 风格轮动。用户问『今天市场怎么样/大盘情况/市场环境/风格轮动/估值分位』时用这个。⚠️ type=updown（涨跌分布）是 **T-1 口径**（返回里会标数据日期，可能滞后一个交易日）—— 要**当期**涨跌家数/涨停家数/市场广度，请用 /v1/changedist（两者数值会不同）。
 |
| | 参数 | 类型 | 必填 | 说明

| | type | string | 否 | 类型：summary/trade/interval/technical/margin/valuation/rotation（updown 为 T-1 口径，当期涨跌家数请用 /v1/changedist）

 `type` string
 类型：summary/trade/interval/technical/margin/valuation/rotation（updown 为 T-1 口径，当期涨跌家数请用 /v1/changedist）

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/market-overview?type=institution"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/market-overview",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/market-overview?type=institution");
console.log(await r.json());
```

 GET `/v1/changedist` 涨跌分布（市场广度） [单独看这一页 →](/docs/endpoints/changedist)
 全市场涨跌家数、涨跌停家数、停牌、成交额与涨跌幅区间分布——衡量市场广度与情绪（**当期口径**）。这是市场广度的推荐入口：不要用 /v1/market-overview?type=updown 取同一数据（那是 T-1 口径，数值会不一致）。
 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/changedist"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/changedist",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/changedist");
console.log(await r.json());
```

 GET `/v1/trade-calendar` 交易日历（开市/休市 · 年末最后交易日） [单独看这一页 →](/docs/endpoints/trade-calendar)
 **A 股交易日历**：逐个日期给出是否开市，以及该日是不是本周/本月/本季/本年的**最后一个交易日**（做结算日、到期日、调仓日的时候要用）。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 单日 YYYY-MM-DD；留空则看 year/start+end，都空=当月

| | start | string | 否 | 区间起始日 YYYY-MM-DD（与 end 配对）

| | end | string | 否 | 区间结束日 YYYY-MM-DD（与 start 配对）

| | year | string | 否 | 整年，如 2026（与 date/start+end 三选一）

| | trading_only | boolean | 否 | true=只返回开市日

| | limit | integer | 否 | 返回行数上限（0=按范围自动：单日/当月不补，年/区间补满 400）

| | offset | integer | 否 | 跳过前 N 行（翻页用）

 `date` string
 单日 YYYY-MM-DD；留空则看 year/start+end，都空=当月

 `start` string
 区间起始日 YYYY-MM-DD（与 end 配对）

 `end` string
 区间结束日 YYYY-MM-DD（与 start 配对）

 `year` string
 整年，如 2026（与 date/start+end 三选一）

 `trading_only` boolean
 true=只返回开市日

 `limit` integer
 返回行数上限（0=按范围自动：单日/当月不补，年/区间补满 400）

 `offset` integer
 跳过前 N 行（翻页用）

 curl

 ```
# 免费端点：无需 API Key（匿名即可调用）
curl "https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/trade-calendar",
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/trade-calendar?date=2026-09-16");
console.log(await r.json());
```

## 付费 85个
 GET `/v1/agent-search` 自然语言受控检索（带证据链 · 供开发者编排） [单独看这一页 →](/docs/endpoints/agent-search)
 ⭐ **自然语言 → 带证据链的结构化候选**，供你自己编排。我们**不生成答案**，只给「结构化结果 + 证据元数据」。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 自然语言查询，如「宁德时代最近资金流入」「贵州茅台最新股价」

| | scope | string | 否 | 数据源范围（可选；不传 = 按问句自动选通道）。可用值：`ashare`（自有数据：资金流/行情/龙虎榜/大宗/两融）· `notice,news,report`（公告/资讯/研报原文）· `web`（网页检索，需 `X-LLM-Key`）· `wechat`（微信公众号，同上，等价于 `web` + `site:mp.weixin.qq.com`）。⚠️ 显式传 `web`/`wechat` 时**只在该通道内找**，取不到会如实 `ok:false`（⛔ 不会退回别的通道凑答案）；⛔ 暂不支持：`a2b`（浏览器渲染）· `xhs` · `local`（本地文档库）

| | depth | string | 否 | 深度。⚠️ P0 只支持 fast

| | max_results | integer | 否 | 结果条数上限

| | clarify | boolean | 否 | 只做标的消歧，不取数（返回带说明的选项）

| | claim | string | 否 | 要核验的断言原文（可选，传了才判 contradicted）

| | replay | boolean | 否 | C6 重放对账（可选）。开启后额外调一次模型比对输出，结果标 match / non_deterministic / not_replayable / skipped_no_client —— ⚠️ 模型路径下通常为 non_deterministic，这不代表结论不可靠

| | authority_min | number | 否 | 权威性下限：低于此分的结果**被过滤**。公告 1.0 / 资讯研报 0.5，传 `0.6` 只要官方一手来源；默认 0（不过滤）

| | recency | string | 否 | 时效窗口，如 `7d` / `24h` / `30m`。⚠️ **只影响裁决，不过滤结果** —— 超出窗口的照常返回，但 `verification` 里会标 `unverified`（我们的定位是**把"哪些验证了、哪些没有"暴露出来**）。不传 ⇒ 不判时效。

 `q` string 是
 自然语言查询，如「宁德时代最近资金流入」「贵州茅台最新股价」

 `scope` string
 数据源范围（可选；不传 = 按问句自动选通道）。可用值：`ashare`（自有数据：资金流/行情/龙虎榜/大宗/两融）· `notice,news,report`（公告/资讯/研报原文）· `web`（网页检索，需 `X-LLM-Key`）· `wechat`（微信公众号，同上，等价于 `web` + `site:mp.weixin.qq.com`）。⚠️ 显式传 `web`/`wechat` 时**只在该通道内找**，取不到会如实 `ok:false`（⛔ 不会退回别的通道凑答案）；⛔ 暂不支持：`a2b`（浏览器渲染）· `xhs` · `local`（本地文档库）

 `depth` string
 深度。⚠️ P0 只支持 fast

 `max_results` integer
 结果条数上限

 `clarify` boolean
 只做标的消歧，不取数（返回带说明的选项）

 `claim` string
 要核验的断言原文（可选，传了才判 contradicted）

 `replay` boolean
 C6 重放对账（可选）。开启后额外调一次模型比对输出，结果标 match / non_deterministic / not_replayable / skipped_no_client —— ⚠️ 模型路径下通常为 non_deterministic，这不代表结论不可靠

 `authority_min` number
 权威性下限：低于此分的结果**被过滤**。公告 1.0 / 资讯研报 0.5，传 `0.6` 只要官方一手来源；默认 0（不过滤）

 `recency` string
 时效窗口，如 `7d` / `24h` / `30m`。⚠️ **只影响裁决，不过滤结果** —— 超出窗口的照常返回，但 `verification` 里会标 `unverified`（我们的定位是**把"哪些验证了、哪些没有"暴露出来**）。不传 ⇒ 不判时效。

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/agent-search",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 POST `/v1/agent-ask` 自然语言问答（带内联引用 · BYOK：用你自己的模型 key） [单独看这一页 →](/docs/endpoints/agent-ask)
 ⭐ **开箱即用问答**：我们取数 + 生成一段带引用的答案，你不用自己编排。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 自然语言问题

| | scope | string | 否 | 数据源范围（可选；不传=按问句自动选通道）

| | max_results | integer | 否 | 取证据条数上限

| | recency | string | 否 | 时效窗口，如 `7d` / `24h`

 `q` string 是
 自然语言问题

 `scope` string
 数据源范围（可选；不传=按问句自动选通道）

 `max_results` integer
 取证据条数上限

 `recency` string
 时效窗口，如 `7d` / `24h`

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/agent-ask",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 POST `/v1/messages` Anthropic Messages 协议（Claude Code / Anthropic SDK · BYOK） [单独看这一页 →](/docs/endpoints/messages)
 ⭐ 给 Claude Code / Anthropic SDK 用的 Messages 协议接入点。
 curl

 ```
# 推荐：Authorization 头（密钥不进日志）
curl -H "Authorization: Bearer YOUR_KEY" \
 "https://api.ashareapi.com/v1/messages"

# 快速测试：直接浏览器打开（?key= 会留在日志/历史里，别用于生产）
curl "https://api.ashareapi.com/v1/messages?key=YOUR_KEY"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/messages",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/messages", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/scanner` 选股员（scanner Agent · 条件选股 · 证据链 · 工具轨迹 · 专业版起） [单独看这一页 →](/docs/endpoints/scanner)
 把自然语言条件交给选股员（scanner Agent），返回候选池、引用与工具轨迹。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 选股条件，如：高ROE + 央企 + 近5日主力净流入

 `q` string 是
 选股条件，如：高ROE + 央企 + 近5日主力净流入

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/scanner",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 POST `/v1/chat/completions` OpenAI Chat Completions 协议（OpenAI SDK / 通用客户端 · BYOK） [单独看这一页 →](/docs/endpoints/chat-completions)
 ⭐ 给 OpenAI SDK / Cherry Studio / ChatBox / OpenWebUI 等客户端用。
 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/chat/completions",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/chat/completions", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 POST `/v1/responses` OpenAI Responses API（Codex / openai SDK 2.x · BYOK） [单独看这一页 →](/docs/endpoints/responses)
 ⭐ OpenAI 新一代 Responses 协议：`input` 支持字符串或消息数组，`instructions` 由我们丢弃（铁律不可覆盖）。
 curl

 ```
# 推荐：Authorization 头（密钥不进日志）
curl -H "Authorization: Bearer YOUR_KEY" \
 "https://api.ashareapi.com/v1/responses"

# 快速测试：直接浏览器打开（?key= 会留在日志/历史里，别用于生产）
curl "https://api.ashareapi.com/v1/responses?key=YOUR_KEY"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/responses",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/responses", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 POST `/v1/agent-research` 异步研究任务（提交 · 带引用报告 · BYOK） [单独看这一页 →](/docs/endpoints/agent-research)
 ⭐ **深度研究**：提交任务后拿 `task_id`，隔一会儿查结果。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 研究问题

| | depth | string | 否 | `fast` / `standard` / `deep`

 `q` string 是
 研究问题

 `depth` string
 `fast` / `standard` / `deep`

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/agent-research",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/kline-full` 全历史 K线（10 年日线 · 原始价 + 复权因子） [单独看这一页 →](/docs/endpoints/kline-full)
 ⭐ **A股全历史日线**（一次拿到**全部日线**，不受数据源单次条数限制）（实测约 2465 根，而 `/v1/kline` 上限 1212 根）。适合：**长周期回测 / 因子研究 / 复权精确计算**。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | A股代码：sh600519 / sz000001 / bj920047（⛔ 不支持 ETF/可转债/指数/板块/港股/美股）

| | fq | string | 否 | 复权：qfq 前复权（默认）/ hfq 后复权 / nofq 不复权原始价

| | start | string | 否 | 起始日期 YYYY-MM-DD（省略 = 从库起点 2016-08-08）

| | end | string | 否 | 结束日期 YYYY-MM-DD（省略 = 到最新交易日）

 `code` string 是
 A股代码：sh600519 / sz000001 / bj920047（⛔ 不支持 ETF/可转债/指数/板块/港股/美股）

 `fq` string
 复权：qfq 前复权（默认）/ hfq 后复权 / nofq 不复权原始价

 `start` string
 起始日期 YYYY-MM-DD（省略 = 从库起点 2016-08-08）

 `end` string
 结束日期 YYYY-MM-DD（省略 = 到最新交易日）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/market-kline` 全市场单日 K 线（一次拿全 A 股某日行情） [单独看这一页 →](/docs/endpoints/market-kline)
 **一次请求返回全市场（5000+ 只 A 股）在某一交易日的日线** —— 适合「每日增量更新全市场」，替代逐只调用（省 5000+ 次请求）。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 是 | 交易日 YYYY-MM-DD（如 2026-09-30；⛔ 非交易日返回空）

| | limit | integer | 否 | 分页：每次最多返回 N 只（0 = 全部 5000+ 只）

| | offset | integer | 否 | 分页偏移（配合 limit 使用）

| | codes | string | 否 | 可选：只取指定股票，逗号分隔（如 sh600519,sz000001；省略 = 全市场）

 `date` string 是
 交易日 YYYY-MM-DD（如 2026-09-30；⛔ 非交易日返回空）

 `limit` integer
 分页：每次最多返回 N 只（0 = 全部 5000+ 只）

 `offset` integer
 分页偏移（配合 limit 使用）

 `codes` string
 可选：只取指定股票，逗号分隔（如 sh600519,sz000001；省略 = 全市场）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/backtest` 量化回测（策略回测 · 单标的实时 / 组合预计算） [单独看这一页 →](/docs/endpoints/backtest)
 ⭐ **量化回测**：对给定标的或组合，按内置策略跑历史回测，返回收益/风险指标（可选净值曲线）。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | single=单标的实时 / portfolio=组合（查预计算）

| | strategy | string | 否 | 内置策略名（见描述）

| | code | string | 否 | mode=single 时必填：A股代码 sh600519

| | start | string | 否 | 回测起始日 YYYY-MM-DD（mode=portfolio 时须为预置区间之一）

| | end | string | 否 | 回测结束日 YYYY-MM-DD（省略=最新）

| | initial_cash | number | 否 | 初始资金（默认 100 万）

| | weighting | string | 否 | mode=portfolio 权重方案：equal=等权 / inv_vol=波动率倒数（机构版）

| | include_equity | boolean | 否 | 是否返回净值曲线

 `mode` string
 single=单标的实时 / portfolio=组合（查预计算）

 `strategy` string
 内置策略名（见描述）

 `code` string
 mode=single 时必填：A股代码 sh600519

 `start` string
 回测起始日 YYYY-MM-DD（mode=portfolio 时须为预置区间之一）

 `end` string
 回测结束日 YYYY-MM-DD（省略=最新）

 `initial_cash` number
 初始资金（默认 100 万）

 `weighting` string
 mode=portfolio 权重方案：equal=等权 / inv_vol=波动率倒数（机构版）

 `include_equity` boolean
 是否返回净值曲线

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/backtest",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/backtest?mode=single", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/strategies` 量化策略清单（单标的 20 + 组合 9 · 含实测表现） [单独看这一页 →](/docs/endpoints/strategies)
 ⭐ **量化策略清单**：列出我们内置的全部策略（单标的择时 + 组合选股），含每个策略的**参数白名单**（名称/类型/最小/最大/默认）。
 curl

 ```
# 推荐：Authorization 头（密钥不进日志）
curl -H "Authorization: Bearer YOUR_KEY" \
 "https://api.ashareapi.com/v1/strategies"

# 快速测试：直接浏览器打开（?key= 会留在日志/历史里，别用于生产）
curl "https://api.ashareapi.com/v1/strategies?key=YOUR_KEY"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/strategies",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/strategies", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/ip-whitelist` 查 IP 白名单（机构版） [单独看这一页 →](/docs/endpoints/ip-whitelist)
 查当前 Key 的 **IP 白名单** —— 只有名单内的 IP 能调这个 Key。
 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/ip-whitelist",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/ip-whitelist", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/backtest-batch` 批量回测（多标的 × 多策略对比） [单独看这一页 →](/docs/endpoints/backtest-batch)
 ⭐ **批量回测**：一次跑**多只标的 × 多个策略**，返回对比矩阵（谁表现最好）。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 逗号分隔的标的（≤20 只），如 sh600519,sz000001

| | strategies | string | 否 | 逗号分隔的策略名（≤10 条）

| | start | string | 否 | 起始日 YYYY-MM-DD

| | end | string | 否 | 结束日 YYYY-MM-DD（省略=最新）

| | initial_cash | number | 否 | 初始资金（每次回测）

 `codes` string 是
 逗号分隔的标的（≤20 只），如 sh600519,sz000001

 `strategies` string
 逗号分隔的策略名（≤10 条）

 `start` string
 起始日 YYYY-MM-DD

 `end` string
 结束日 YYYY-MM-DD（省略=最新）

 `initial_cash` number
 初始资金（每次回测）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/backtest-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/factors` 量化因子库（88 因子 + 50 筛选入口 + 预设模板） [单独看这一页 →](/docs/endpoints/factors)
 ⭐ **量化因子库 / 筛选能力字典**：列出全部可用于筛选的因子与入口。
 |
| | 参数 | 类型 | 必填 | 说明

| | category | string | 否 | 按分类过滤：估值/行情/盈利/资产负债/现金流（省略=全部）

| | kind | string | 否 | 只看筛选入口：排行/标签/事件（省略=不限）

 `category` string
 按分类过滤：估值/行情/盈利/资产负债/现金流（省略=全部）

 `kind` string
 只看筛选入口：排行/标签/事件（省略=不限）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/factors",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/factors?category=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/playbooks` 量化方法论库（怎么判断市场 · 怎么避坑） [单独看这一页 →](/docs/endpoints/playbooks)
 ⭐ **量化方法论库**：一套套「怎么判断市场」的可复用流程 —— **每条都写清判据、阶段、应对，以及它能帮你避开什么亏损**。
 |
| | 参数 | 类型 | 必填 | 说明

| | category | string | 否 | 按玩法过滤（如 情绪周期/风险管理；省略=全部）

| | id | string | 否 | 按 id 取单条（如 sentiment-cycle）

 `category` string
 按玩法过滤（如 情绪周期/风险管理；省略=全部）

 `id` string
 按 id 取单条（如 sentiment-cycle）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/playbooks",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/playbooks?category=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/minute` 分时（当日 / 近 5 日盘中走势） [单独看这一页 →](/docs/endpoints/minute)
 **分时数据**：盘中每分钟的价格与累计成交量。用户问『今日分时 / 盘中走势 / 分钟级走势 / 今天怎么走的』时用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667；同样支持 指数 sh000001 / 板块 pt01801081 / ETF sh510300 / 港股 hk00700 / 美股 usAAPL / 可转债 sz128136 / 北交所 bj920047 / 期货 fuCN / 外汇 fxCNH

| | days | integer | 否 | 分时档位：1 = 当日（默认）· 5 = 近 5 个交易日（**没有 2/3/4**）

 `code` string 是
 股票代码：sh600667；同样支持 指数 sh000001 / 板块 pt01801081 / ETF sh510300 / 港股 hk00700 / 美股 usAAPL / 可转债 sz128136 / 北交所 bj920047 / 期货 fuCN / 外汇 fxCNH

 `days` integer
 分时档位：1 = 当日（默认）· 5 = 近 5 个交易日（**没有 2/3/4**）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/minute",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/minute?code=sh600667&days=15", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/news` 个股资讯（列表 / 详情） [单独看这一页 →](/docs/endpoints/news)
 个股/指数/ETF/板块/可转债的**财经资讯**。**不传 id** ⇒ 列表（`code` 必填，返回标题 + 来源 + 时间）；**传 id** ⇒ ⭐ 该条**完整正文**。用户问『这股票最近有什么新闻/消息面/这条新闻讲了什么』时用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 否 | 个股/指数/ETF/板块代码：sh600519 / 000001 / sz300750（取列表时必填）

| | id | string | 否 | 资讯 id（如 SN20261010173533a6c32421）—— 传它就取**完整正文**（Markdown），此时 code 可省

| | limit | integer | 否 | 返回条数，默认 50（上限 100）

| | type | string | 否 | 可选：按资讯类型过滤（传 1 只返「研报」类）

 `code` string
 个股/指数/ETF/板块代码：sh600519 / 000001 / sz300750（取列表时必填）

 `id` string
 资讯 id（如 SN20261010173533a6c32421）—— 传它就取**完整正文**（Markdown），此时 code 可省

 `limit` integer
 返回条数，默认 50（上限 100）

 `type` string
 可选：按资讯类型过滤（传 1 只返「研报」类）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/news",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/news?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/notice` 公告（列表 / 详情） [单独看这一页 →](/docs/endpoints/notice)
 上市公司公告。**不传 id** ⇒ 列表（`code` 必填，支持 type / limit / offset 翻页，可回溯约 16 年 —— 实测茅台 929 条到 2010 年）；**传 id** ⇒ 该公告详情。用户问『公告/披露/半年度报告/年报在哪』时用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 否 | 股票代码（取列表时必填）：sh600519 / sz000001

| | id | string | 否 | 公告 id（如 nos1225475868）—— 传它就取**详情**，此时 code 可省

| | type | string | 否 | 可选：公告类型 0-7（⛔ 不是 01010503 这类信披码，传错会静默返全量）

| | limit | integer | 否 | 返回条数，默认 50（上限 100）

| | offset | integer | 否 | 偏移量（**有效**，0 ~ total−1）—— 翻历史用，如 offset=900 可得约 2010 年

 `code` string
 股票代码（取列表时必填）：sh600519 / sz000001

 `id` string
 公告 id（如 nos1225475868）—— 传它就取**详情**，此时 code 可省

 `type` string
 可选：公告类型 0-7（⛔ 不是 01010503 这类信披码，传错会静默返全量）

 `limit` integer
 返回条数，默认 50（上限 100）

 `offset` integer
 偏移量（**有效**，0 ~ total−1）—— 翻历史用，如 offset=900 可得约 2010 年

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/notice",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/notice?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/finance` 财务报表 [单独看这一页 →](/docs/endpoints/finance)
 财务报表三件套：利润表 / 资产负债表 / 现金流量表（多期，最近 N 期）。用户问『营收/净利润/毛利率/负债/财务数据』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

| | num | integer | 否 | 返回期数，默认 4 期（最近 N 期，降序）

 `code` string 是
 股票代码：sh600667

 `num` integer
 返回期数，默认 4 期（最近 N 期，降序）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/finance",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/finance?code=sh600667&num=4", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/finance-batch` 批量财务报表（多只一次取） [单独看这一页 →](/docs/endpoints/finance-batch)
 ⭐ **一次拿多只的三大报表**（利润表 / 资产负债表 / 现金流量表），**逐只标明成功与否** —— 给量化选股后的批量财务筛选（营收/净利/ROE/负债率/现金流）用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤20 只 · 机构版 ≤30 只）

| | periods | integer | 否 | 每只返回期数（默认 4，最多 12，降序最新在前）

| | type | string | 否 | 只取一张表：income / balance / cashflow（省略=三张全取）

| | fields | string | 否 | 字段范围：all（默认，186 列）/ core（69 列，载荷约 1/3）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤20 只 · 机构版 ≤30 只）

 `periods` integer
 每只返回期数（默认 4，最多 12，降序最新在前）

 `type` string
 只取一张表：income / balance / cashflow（省略=三张全取）

 `fields` string
 字段范围：all（默认，186 列）/ core（69 列，载荷约 1/3）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/finance-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/finance-batch?codes=&periods=4", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/technical-batch` 批量技术指标（多只一次取 · 55 项） [单独看这一页 →](/docs/endpoints/technical-batch)
 ⭐ **一次拿多只的技术指标**（MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV / VR / BBI / TRIX / DPO / PSY / ENE / CCI …**共 55 项**），**逐只标明成功与否** —— 给量化做**全市场批量技术面筛选**用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,hk00700（专业版 ≤500 只 · 机构版 ≤1000 只）

| | date | string | 否 | 交易日 YYYY-MM-DD（默认最新）。对所有代码同时生效；非交易日自动回退，以返回的 date 为准

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,hk00700（专业版 ≤500 只 · 机构版 ≤1000 只）

 `date` string
 交易日 YYYY-MM-DD（默认最新）。对所有代码同时生效；非交易日自动回退，以返回的 date 为准

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/technical-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/fund` 个股资金+龙虎榜+大宗+两融（综合） [单独看这一页 →](/docs/endpoints/fund)
 一个接口拿全交易面：主力资金（当日/5/10/20 日净流入 + 全市场排名）、龙虎榜（上榜原因/买卖总额/营业部明细）、大宗交易、融资融券。用户问『主力资金/资金流/龙虎榜/机构动向』时优先用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

 `code` string 是
 股票代码：sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/fund",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/fund?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/fund-batch` 批量资金流（多股一次取） [单独看这一页 →](/docs/endpoints/fund-batch)
 ⭐ **一次拿多只股票的资金流**（主力资金 + 龙虎榜 + 大宗 + 融资融券），每只一条记录。**给量化/批量研究用** —— 一次扫一个行业或自选池，不必一只一只调 `/v1/fund`。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/fund-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/fund-batch?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/quote-batch` 批量行情（多只一次取） [单独看这一页 →](/docs/endpoints/quote-batch)
 ⭐ **一次拿多只股票的行情**，**逐只标明成功与否** —— 给量化/批量研究用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

| | period | string | 否 | 周期：day/week/month/season/year 或 m1~m120

| | count | integer | 否 | 每只返回几条，默认 1（只取最新）

| | start | string | 否 | 起始日期 YYYY-MM-DD（可选）

| | end | string | 否 | 结束日期 YYYY-MM-DD（可选）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

 `period` string
 周期：day/week/month/season/year 或 m1~m120

 `count` integer
 每只返回几条，默认 1（只取最新）

 `start` string
 起始日期 YYYY-MM-DD（可选）

 `end` string
 结束日期 YYYY-MM-DD（可选）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/quote-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/quote-batch?codes=&period=day", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/kline-batch` 批量 K 线（多只一次取） [单独看这一页 →](/docs/endpoints/kline-batch)
 ⭐ **一次拿多只股票的 K 线**（多只 × 同一段时间），**逐只标明成功与否** —— 给量化/批量研究用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

| | period | string | 否 | 周期：day/week/month/season/year 或 m1~m120

| | count | integer | 否 | 每只返回几根，默认 30

| | start | string | 否 | 起始日期 YYYY-MM-DD（可选）

| | end | string | 否 | 结束日期 YYYY-MM-DD（可选）

| | fq | string | 否 | 复权：qfq 前复权 / hfq 后复权 / nofq 不复权（留空 = 服务端默认）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001,sz300750

 `period` string
 周期：day/week/month/season/year 或 m1~m120

 `count` integer
 每只返回几根，默认 30

 `start` string
 起始日期 YYYY-MM-DD（可选）

 `end` string
 结束日期 YYYY-MM-DD（可选）

 `fq` string
 复权：qfq 前复权 / hfq 后复权 / nofq 不复权（留空 = 服务端默认）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/kline-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/kline-batch?codes=&period=day", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/snapshot-batch` 批量全字段画像（多只一次取） [单独看这一页 →](/docs/endpoints/snapshot-batch)
 ⭐ **一次拿多只股票的完整画像**（35+ 字段：价格/盘口五档/PE·PB/市值/股本/涨停跌停价/量比/振幅/涨速/外盘内盘），**逐只标明成功与否**。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤200 只 · 机构版 ≤250 只）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤200 只 · 机构版 ≤250 只）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/snapshot-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/snapshot-batch?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/profile-batch` 批量公司简况（多只一次取） [单独看这一页 →](/docs/endpoints/profile-batch)
 ⭐ **一次拿多只公司的简况**（上市日期 / 主营业务 / 所属行业 / 官网 / 注册资本 / 董事长 / 联系方式），**逐只标明成功与否** —— 给量化选股后的批量画像、行业归类用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤100 只 · 机构版 ≤150 只）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤100 只 · 机构版 ≤150 只）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/profile-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/profile-batch?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/chip-batch` 批量筹码分布（多只一次取） [单独看这一页 →](/docs/endpoints/chip-batch)
 ⭐ **一次拿多只股票的筹码分布与持仓成本**（获利盘比例 / 平均成本 / 90% 与 70% 集中度），**逐只标明成功与否** —— 给量化筛股后判断抛压用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤200 只 · 机构版 ≤300 只）

| | date | string | 否 | 交易日 YYYY-MM-DD（默认最新，对所有代码生效）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,sz000001（专业版 ≤200 只 · 机构版 ≤300 只）

 `date` string
 交易日 YYYY-MM-DD（默认最新，对所有代码生效）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/chip-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/technical` 技术指标 [单独看这一页 →](/docs/endpoints/technical)
 技术指标全家桶：MA / EMA / MACD / KDJ / RSI / BOLL / BIAS / WR / DMI / OBV 等**共 55 项**。用户问『技术面/指标/金叉死叉/超买超卖』时用。`date` 可回看历史（`YYYY-MM-DD`，缺省=最新）；**只有日线口径**。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 / 600667

| | date | string | 否 | 交易日 YYYY-MM-DD（默认最新）。非交易日自动回退到最近交易日，以返回的 date 为准

 `code` string 是
 股票代码：sh600667 / 600667

 `date` string
 交易日 YYYY-MM-DD（默认最新）。非交易日自动回退到最近交易日，以返回的 date 为准

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/technical",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/shareholder` 股东研究 [单独看这一页 →](/docs/endpoints/shareholder)
 股东研究（多段返回）。用户问『谁在持有/股东变化/筹码集中/机构持仓』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

 `code` string 是
 股票代码：sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/shareholder",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/shareholder?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/shareholder-batch` 批量股东研究（多只一次取） [单独看这一页 →](/docs/endpoints/shareholder-batch)
 ⭐ **一次拿多只的股东研究**（十大股东 / 十大流通股东 / 股东户数统计），**逐只标明成功与否** —— 给量化选股后的批量『谁在持有、股权集中度如何』用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 多个股票代码，逗号分隔：sh600519,hk00700（专业版 ≤200 只 · 机构版 ≤300 只）

 `codes` string 是
 多个股票代码，逗号分隔：sh600519,hk00700（专业版 ≤200 只 · 机构版 ≤300 只）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/shareholder-batch",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/shareholder-batch?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/chip` 筹码分布/成本 [单独看这一页 →](/docs/endpoints/chip)
 筹码分布与持仓成本（套牢盘/获利盘比例，判断抛压）。返回：筹码/成本分布/集中度/时段。`date` 可回看历史（`YYYY-MM-DD`，缺省=最新）。⚠️ **历史仅保留约近 1 年**（实测 2025-10-24 起；更早返回空 ⇒ `ok:false` 且不扣次数）。⚠️ **非交易日/未来日期会自动回退到最近交易日** —— 返回行的 `date` 才是实际日期，以它为准。⚠️ **支持沪深 A 股与 ETF**（实测 `sh510300` 回平均成本 4.39 / 获利比例 13.47%；ETF 的「筹码」口径与个股相同）；**港股 / 美股不支持**。代码可传 `sh600667` 或裸 6 位 `600667`。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 / 600667

| | date | string | 否 | 交易日 YYYY-MM-DD（默认最新）。非交易日自动回退到最近交易日，以返回的 date 为准

 `code` string 是
 股票代码：sh600667 / 600667

 `date` string
 交易日 YYYY-MM-DD（默认最新）。非交易日自动回退到最近交易日，以返回的 date 为准

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/chip",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/orderbook` 五档盘口（order book · 买五卖五） [单独看这一页 →](/docs/endpoints/orderbook)
 **秒级快照**：买一~买五 / 卖一~卖五的**价格与挂单量（手）**，含现价/涨跌/数据时间。字段命名对齐 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**（正常现象）。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

 `code` string 是
 股票代码：sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/orderbook",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/orderbook?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/snapshot` 全字段行情画像（估值/市值/股本/涨停价） [单独看这一页 →](/docs/endpoints/snapshot)
 **一只股票的完整画像**：价格 + 盘口（买五卖五+委差）+ 估值（PE TTM/动/静 + PB） + 市值（流通/总）+ 股本（流通/总）+ 打板（涨停/跌停价 + 量比 + 振幅 + 涨速） + 标识（证券类型/股票状态/币种）+ 外盘/内盘。⚠️ **与 /v1/quote 的分工**：quote 轻（8 字段）· 走官方通道 · **免费**；本端点全（35 字段）· **pro 档**。只要现价用 quote 更轻（字段少、响应快）。⚠️ **仅 A 股**（港股/美股字段布局不同，请用 `/v1/quote`）——**传其他市场返回空，不返回错数据**。⚠️ **计费 = 次数**：本端点 1 次拿全 35 字段——**要估值+市值+股本+涨停价多项时，比分别调 quote/valuation/orderbook 更省次数**。⚠️ 单位：`volume` 手 · `amount` 万元 · 市值 亿元 · 股本 股 · 比率/涨幅 百分数。（字段含义见 https://ashareapi.com/docs/）
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | A 股代码：sh600667 / 600667 / sz300750

 `code` string 是
 A 股代码：sh600667 / 600667 / sz300750

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/snapshot",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/snapshot?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/abnormal` 异动 / 偏离值（监管异动体系） [单独看这一页 →](/docs/endpoints/abnormal)
 **短线监管异动 / 偏离值**：触发「严重异动」、「10日100% 偏离」、异动盯盘名单、严重异动提醒。这是**短线风控的关键信号**（个股因连续大涨/大跌被交易所或数据方标记异动）。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | deviation / deviation_hist / deviation_plan / abnormal / watch / watch_hist / alert

| | date | string | 否 | 历史类 mode 需要的日期（YYYY-MM-DD）；空=今天

| | limit | integer | 否 | 仅 mode=abnormal/alert 生效：单次返回上限（默认 600）

 `mode` string
 deviation / deviation_hist / deviation_plan / abnormal / watch / watch_hist / alert

 `date` string
 历史类 mode 需要的日期（YYYY-MM-DD）；空=今天

 `limit` integer
 仅 mode=abnormal/alert 生效：单次返回上限（默认 600）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/abnormal",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/abnormal?mode=deviation", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/review` 复盘（涨停结构：板块主线 / 连板梯队） [单独看这一页 →](/docs/endpoints/review)
 **短线复盘（涨停结构）**：看今天钱在哪些题材、梯队结构长什么样。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | board 板块主线 / ladder 连板梯队

| | date | string | 否 | 历史日期（YYYY-MM-DD）；空=实时

 `mode` string
 board 板块主线 / ladder 连板梯队

 `date` string
 历史日期（YYYY-MM-DD）；空=实时

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/review",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/review?mode=board", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/limit-up` 打板（涨停池明细 / 竞价涨停） [单独看这一页 →](/docs/endpoints/limit-up)
 **短线打板**：当日涨停个股，含**涨停原因**与**资金面**。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | limit 涨停池明细 / auction 竞价涨停

| | date | string | 否 | 历史日期（YYYY-MM-DD）；空=实时

 `mode` string
 limit 涨停池明细 / auction 竞价涨停

 `date` string
 历史日期（YYYY-MM-DD）；空=实时

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/limit-up",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/limit-up?mode=limit", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/auction` 集合竞价（当日分时 / 历史逐笔 / 竞价量额） [单独看这一页 →](/docs/endpoints/auction)
 **短线集合竞价**：个股 9:15–9:25 集合竞价数据，含**「竞价触及涨停 / 触及跌停」判定**。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | stock 当日分时 / stock-history 历史逐笔（需 date）/ volume 竞价量额

| | code | string | 是 | 股票代码：sh600667 或 600667（裸码/带前缀均可）

| | date | string | 否 | 历史日期（YYYY-MM-DD）；仅 mode=stock-history 必填

 `mode` string
 stock 当日分时 / stock-history 历史逐笔（需 date）/ volume 竞价量额

 `code` string 是
 股票代码：sh600667 或 600667（裸码/带前缀均可）

 `date` string
 历史日期（YYYY-MM-DD）；仅 mode=stock-history 必填

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/auction",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/auction?code=sh600667&mode=stock", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/events` 个股事件标签（42 类） [单独看这一页 →](/docs/endpoints/events)
 个股事件总览：大宗交易/龙虎榜/回购/定增/分红/业绩/解禁等 42 类事件标签。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

 `code` string 是
 股票代码：sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/events",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/events?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/bigorder` L2 大单净额分时（分钟级 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder)
 **单股大单资金分时**：每 1 分钟一个点，`net` = 该分钟**大单净额（元）**，正数=大单净买入、负数=净卖出。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

 `code` string 是
 股票代码：sh600667 或 600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/bigorder",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/bigorder?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/bigorder-flow` L2 大单成交明细（含主动/被动拆分 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder-flow)
 **逐笔大单成交**：单只票当日每一笔**成交额 ≥ 阈值**的大单，并按**主动 / 被动 × 买 / 卖**四方向标注。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

| | money | integer | 否 | 金额阈值档：0=30万 1=50万 2=100万 3=300万 4=1000万

| | limit | integer | 否 | 返回条数（上限 200）

 `code` string 是
 股票代码：sh600667 或 600667

 `money` integer
 金额阈值档：0=30万 1=50万 2=100万 3=300万 4=1000万

 `limit` integer
 返回条数（上限 200）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/bigorder-queue` L2 大单委托流（挂单 + 撤单标记 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder-queue)
 **大单挂单明细**：当日**委托量或委托金额**超过阈值的挂单，逐笔列出，并带**涨停标记**与**撤单标记**。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

| | vol | integer | 否 | 委托量阈值（手）：500/1000/2000/5000/10000

| | tur | integer | 否 | 委托金额阈值（万元）：30/50/100/200/500/1000

| | limit | integer | 否 | 返回条数（上限 200）

 `code` string 是
 股票代码：sh600667 或 600667

 `vol` integer
 委托量阈值（手）：500/1000/2000/5000/10000

 `tur` integer
 委托金额阈值（万元）：30/50/100/200/500/1000

 `limit` integer
 返回条数（上限 200）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/bigorder-history` L2 历史大单净额（逐日 · 最多 100 个交易日 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder-history)
 **单股逐日大单净额**：往回最多 **100 个交易日**，每天一个值，`net` = 当日**大单净额（元）**，正数=大单净买入、负数=净卖出。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

| | limit | integer | 否 | 返回天数（1~100，默认全部）

 `code` string 是
 股票代码：sh600667 或 600667

 `limit` integer
 返回天数（1~100，默认全部）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/bigorder-split` L2 主力四分解（分钟级 · 主动/被动 × 买/卖 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder-split)
 **分钟级主力资金四分解**：把主买拆成**主动买 + 被动买**、主卖拆成**主动卖 + 被动卖**，每 1 分钟一行。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

| | date | string | 否 | 交易日 YYYY-MM-DD（留空=当日实时）

 `code` string 是
 股票代码：sh600667 或 600667

 `date` string
 交易日 YYYY-MM-DD（留空=当日实时）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/bigorder-rank` L2 全市场主力净额榜（5568 只 · 8 种排序 · 机构版专属） [单独看这一页 →](/docs/endpoints/bigorder-rank)
 **全市场主力资金排行榜**：一次拿到全市场（约 5568 只）的主力买卖与净额，按 8 种维度排序，支持翻页和历史回看。
 |
| | 参数 | 类型 | 必填 | 说明

| | sort | string | 否 | 排序：net_in/net_out/buy/sell/gain/loss/turnover/mcap

| | limit | integer | 否 | 返回条数（最大 6000 = 全市场）

| | offset | integer | 否 | 偏移（翻页用）

| | date | string | 否 | 交易日 YYYY-MM-DD（留空=当日）

 `sort` string
 排序：net_in/net_out/buy/sell/gain/loss/turnover/mcap

 `limit` integer
 返回条数（最大 6000 = 全市场）

 `offset` integer
 偏移（翻页用）

 `date` string
 交易日 YYYY-MM-DD（留空=当日）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/bigorder-rank",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/bigorder-rank?sort=net_in", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/lhb-seats` 龙虎榜席位明细（营业部 · 游资标记 · 机构版专属） [单独看这一页 →](/docs/endpoints/lhb-seats)
 **龙虎榜营业部席位**：某只票某次上榜的**买卖席位明细**（最多 10 个营业部），带**游资标记**。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667 或 600667

| | date | string | 否 | 上榜日 YYYY-MM-DD（留空 = 最近一次上榜）

 `code` string 是
 股票代码：sh600667 或 600667

 `date` string
 上榜日 YYYY-MM-DD（留空 = 最近一次上榜）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/lhb-agency` 龙虎榜机构参与个股榜（全市场 · 机构买入/卖出 · 机构版专属） [单独看这一页 →](/docs/endpoints/lhb-agency)
 **全市场机构榜**：某个交易日**机构席位在龙虎榜上参与过的所有个股**，一次拿完（实测单日 51 只），带**机构买入额**与**所属风口板块**。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 交易日 YYYY-MM-DD（留空 = 数据源最近交易日）

| | sort | string | 否 | 排序：net_buy / change_pct / turnover_rate / market_cap

| | limit | integer | 否 | 返回条数

 `date` string
 交易日 YYYY-MM-DD（留空 = 数据源最近交易日）

 `sort` string
 排序：net_buy / change_pct / turnover_rate / market_cap

 `limit` integer
 返回条数

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/lhb-agency",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/market-mood` 市场情绪（破板率 + 赚钱效应 9 日趋势） [单独看这一页 →](/docs/endpoints/market-mood)
 **一句话看今天短线情绪冷不冷**：破板率 + 最近 9 个交易日的赚钱效应序列。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 交易日 YYYY-MM-DD（留空 = 最近）

 `date` string
 交易日 YYYY-MM-DD（留空 = 最近）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/market-mood",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/limit-reason` 涨停原因（某只票的历史涨停记录 + 完整原因文案） [单独看这一页 →](/docs/endpoints/limit-reason)
 **「这只票为什么涨停」的答案**：每次涨停的**完整原因文案** + 所属板块 + 当日是「日内龙几」。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 6 位 A 股代码（如 sh600519 或 600519）

| | date | string | 否 | 交易日 YYYY-MM-DD（留空 = 最近）

| | limit | integer | 否 | 返回条数

 `code` string 是
 6 位 A 股代码（如 sh600519 或 600519）

 `date` string
 交易日 YYYY-MM-DD（留空 = 最近）

 `limit` integer
 返回条数

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/broken-board` 炸板历史（某日炸板股清单 + 概念） [单独看这一页 →](/docs/endpoints/broken-board)
 **某天有哪些票涨停被砸开**（炸板），带概念标签。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 交易日 YYYY-MM-DD（留空 = 最近工作日）

| | limit | integer | 否 | 返回条数

 `date` string
 交易日 YYYY-MM-DD（留空 = 最近工作日）

 `limit` integer
 返回条数

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/broken-board",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/tail-chase` 尾盘抢筹（全市场 · 抢筹金额榜） [单独看这一页 →](/docs/endpoints/tail-chase)
 **尾盘资金在抢哪些票**：全市场约 292 只，带抢筹金额、题材、涨幅。
 |
| | 参数 | 类型 | 必填 | 说明

| | limit | integer | 否 | 返回条数

| | sort | string | 否 | 排序：chase_amount / change_pct

 `limit` integer
 返回条数

 `sort` string
 排序：chase_amount / change_pct

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/tail-chase",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/tail-chase?limit=10", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/northbound` A 股北向资金分板块持仓（季度） [单独看这一页 →](/docs/endpoints/northbound)
 **外资（北向）在 A 股各板块的持仓**：按季度公布，实测 20 个板块。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 报告期 YYYY-MM-DD（季度末，如 2026-09-30；留空 = 最近季度末）

| | limit | integer | 否 | 返回条数

 `date` string
 报告期 YYYY-MM-DD（季度末，如 2026-09-30；留空 = 最近季度末）

 `limit` integer
 返回条数

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/northbound",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/northbound?date=2026-09-16", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/new-high` 百日新高（按题材汇总） [单独看这一页 →](/docs/endpoints/new-high)
 **哪些题材今天在创百日新高**：按题材汇总家数，实测 18 个题材。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 交易日 YYYY-MM-DD（留空 = 最近）

| | limit | integer | 否 | 返回条数

 `date` string
 交易日 YYYY-MM-DD（留空 = 最近）

 `limit` integer
 返回条数

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/new-high",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/flash` 7×24 财经快讯（全市场电报） [单独看这一页 →](/docs/endpoints/flash)
 **全市场财经快讯**（财联社等来源），按时间**倒序**，每 1 分钟刷新一次缓存。用户问『今天有什么大消息 / 最新财经新闻 / 刚才发生了什么』用这个。
 |
| | 参数 | 类型 | 必填 | 说明

| | limit | integer | 否 | 返回条数（上限 200）

| | index | integer | 否 | 翻页偏移（0/20/40…，步长=上次的 limit）

 `limit` integer
 返回条数（上限 200）

 `index` integer
 翻页偏移（0/20/40…，步长=上次的 limit）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/flash",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/flash?limit=10", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/evidence` 财经多源取证（公告 + 资讯 · 带证据指纹） [单独看这一页 →](/docs/endpoints/evidence)
 **一次查询，多源取证**：同时检索**巨潮公告**（沪深两市，官方一手）与**东方财富资讯**，归一成同一张表，并把转载去重。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 检索词：宁德时代 / 贵州茅台 / 三季度业绩

| | scope | string | 否 | 范围：notice 公告 / news 资讯 / report 研报，逗号分隔

| | limit | integer | 否 | 返回条数（各源平分名额）

 `q` string 是
 检索词：宁德时代 / 贵州茅台 / 三季度业绩

 `scope` string
 范围：notice 公告 / news 资讯 / report 研报，逗号分隔

 `limit` integer
 返回条数（各源平分名额）

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/evidence",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/lhb` 龙虎榜分榜（6 类 · 总榜/机构/席位/高胜率） [单独看这一页 →](/docs/endpoints/lhb)
 全市场龙虎榜，按类型分 6 种榜：
`all` **全市场总榜**（当日上榜股 · 净买/买卖额）/ `institution` **机构榜**（机构数 / 机构买入 / 净买）/ `activeseat` **活跃席位**（席位买入额 + 关联个股）/ `winbuy` **高胜率买入**（净买额 / 胜率 / 席位明细）/ `winseat` **高胜率席位**（席位胜率 + 关联个股）/ `hotmoney` 游资榜。
 |
| | 参数 | 类型 | 必填 | 说明

| | type | string | 否 | 榜单类型：all 总榜 / institution 机构 / activeseat 活跃席位 / winbuy 高胜率买入 / winseat 高胜率席位 / hotmoney 游资（暂无数据）

| | date | string | 否 | 日期 YYYY-MM-DD（留空=最近交易日）

 `type` string
 榜单类型：all 总榜 / institution 机构 / activeseat 活跃席位 / winbuy 高胜率买入 / winseat 高胜率席位 / hotmoney 游资（暂无数据）

 `date` string
 日期 YYYY-MM-DD（留空=最近交易日）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/lhb",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/lhb?type=institution", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/screen` 选股（因子 / 标签 / 排行 / 策略 / 事件） [单独看这一页 →](/docs/endpoints/screen)
 按条件筛出股票清单。**五个模式，用 mode 选**（默认 condition）：
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | condition 因子 / label 标签 / ranking 排行 / strategy 策略 / event 事件

| | list | boolean | 否 | true=列出该模式全部可用取值（带中文名与分组）

| | expr | string | 否 | [condition] 因子表达式，如 intersect([PE_TTM > 0, ROETTM > 15])

| | preset | string | 否 | [condition] 预设名（与 expr 二选一）：LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个

| | type | string | 否 | [label/ranking/strategy/event] 取值；list=true 时作分组过滤

| | limit | integer | 否 | 返回条数，默认 20（上限 200）

| | offset | integer | 否 | 跳过前 N 条（翻页）

| | orderby | string | 否 | [condition] 排序字段（如 ROETTM）

| | desc | boolean | 否 | [condition] True 降序 / False 升序

| | date | string | 否 | [label/ranking/strategy] 查询日期 YYYY-MM-DD（留空=最新交易日）

| | start | string | 否 | [label/strategy] 区间起始日 YYYY-MM-DD

| | end | string | 否 | [label/strategy] 区间结束日 YYYY-MM-DD

| | asset | string | 否 | [label/ranking] 资产类别：stock 股票（默认）/ etf

| | universe | string | 否 | [condition] 限定股票池，传**个股代码**（如 sh600519）；⚠️ 传板块代码会报错

| | market | string | 否 | [condition] 市场：hs 沪深 / hk 港股 / us 美股（留空=沪深）。⚠️ 港美股市盈率字段用 PeTTM，不是 PE_TTM

 `mode` string
 condition 因子 / label 标签 / ranking 排行 / strategy 策略 / event 事件

 `list` boolean
 true=列出该模式全部可用取值（带中文名与分组）

 `expr` string
 [condition] 因子表达式，如 intersect([PE_TTM > 0, ROETTM > 15])

 `preset` string
 [condition] 预设名（与 expr 二选一）：LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个

 `type` string
 [label/ranking/strategy/event] 取值；list=true 时作分组过滤

 `limit` integer
 返回条数，默认 20（上限 200）

 `offset` integer
 跳过前 N 条（翻页）

 `orderby` string
 [condition] 排序字段（如 ROETTM）

 `desc` boolean
 [condition] True 降序 / False 升序

 `date` string
 [label/ranking/strategy] 查询日期 YYYY-MM-DD（留空=最新交易日）

 `start` string
 [label/strategy] 区间起始日 YYYY-MM-DD

 `end` string
 [label/strategy] 区间结束日 YYYY-MM-DD

 `asset` string
 [label/ranking] 资产类别：stock 股票（默认）/ etf

 `universe` string
 [condition] 限定股票池，传**个股代码**（如 sh600519）；⚠️ 传板块代码会报错

 `market` string
 [condition] 市场：hs 沪深 / hk 港股 / us 美股（留空=沪深）。⚠️ 港美股市盈率字段用 PeTTM，不是 PE_TTM

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/screen",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/screen?mode=condition", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/sector` 板块行情榜 [单独看这一页 →](/docs/endpoints/sector)
 行业/概念/地域板块涨幅榜 + 领涨股。用户问『哪些板块在涨/板块轮动/行业热度』时用。
 curl

 ```
# 推荐：Authorization 头（密钥不进日志）
curl -H "Authorization: Bearer YOUR_KEY" \
 "https://api.ashareapi.com/v1/sector"

# 快速测试：直接浏览器打开（?key= 会留在日志/历史里，别用于生产）
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/sector",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/sector", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/industry-chain` 产业链（主题/图谱/个股定位） [单独看这一页 →](/docs/endpoints/industry-chain)
 A 股产业链数据（**183 个产业链主题**）：mode=list 主题列表 · mode=graph&topic=超级电容 → **产业链图谱**（关联个股 + 所属节点 + 产业链位置 上游/中游/下游）· mode=stock&code=sh600667 → **个股所属产业链**（主题 / 节点 / 位置 / 关联度 / **业务描述**）。用户问『产业链/上下游/某公司处于链上什么位置/这个主题有哪些公司』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | list 主题列表 / graph 主题图谱 / stock 个股定位

| | topic | string | 否 | 主题名（mode=graph）：如 超级电容 / 集成电路

| | code | string | 否 | 股票代码（mode=stock）：如 sh600667

 `mode` string
 list 主题列表 / graph 主题图谱 / stock 个股定位

 `topic` string
 主题名（mode=graph）：如 超级电容 / 集成电路

 `code` string
 股票代码（mode=stock）：如 sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/industry-chain",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/industry-chain?mode=graph", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/sector-valuation` 板块估值（含历史百分位） [单独看这一页 →](/docs/endpoints/sector-valuation)
 申万板块 PE/PB/PS/PCF + 股息率 + 历史百分位。code 形如 pt01801780。用户问『某板块贵不贵/估值分位』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 申万板块代码：pt01801780

 `code` string 是
 申万板块代码：pt01801780

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/sector-valuation?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/index-constituent` 指数成分股（沪深300 等 · 全量清单） [单独看这一页 →](/docs/endpoints/index-constituent)
 ⭐ **指数成分股全量清单**（一次给全，不受条数上限）：`sh000300` 返回 **300 只**，字段 `code` / `name` / `IndexName`。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 指数代码：sh000300 / sh000016 / sh000905 / sz399006 / hkHSI

 `code` string 是
 指数代码：sh000300 / sh000016 / sh000905 / sz399006 / hkHSI

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/index-constituent?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/macro` 宏观数据 [单独看这一页 →](/docs/endpoints/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）；留空=该地区全套

| | limit | integer | 否 | 每个指标最多返回最近 N 条（默认 12；月度指标取多年历史建议 60）

 `region` string
 地区：cn 中国 / us 美国 / jp 日本 / eu 欧洲 / hk 香港

 `names` string
 指标短名（如 cn_gdp / cn_cpi_ppi / cn_lpr / us_inflation）；留空=该地区全套

 `limit` integer
 每个指标最多返回最近 N 条（默认 12；月度指标取多年历史建议 60）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/macro",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/macro?region=cn", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/suspension` 停复牌列表（沪深 / 港股 / 美股） [单独看这一页 →](/docs/endpoints/suspension)
 **当日停复牌清单**：哪些票停牌、哪些复牌、停牌原因。用户问『今天哪些票停牌/复牌/停牌原因』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | market | string | 否 | 市场：沪深（默认）/ 港股 / 美股（或 hs/hk/us）

 `market` string
 市场：沪深（默认）/ 港股 / 美股（或 hs/hk/us）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/suspension",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/suspension?market=hs", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/buyback` 公司回购（A股 / 港股） [单独看这一页 →](/docs/endpoints/buyback)
 **公司股份回购记录**。用户问『这家公司在回购吗/回购了多少/回购价多少』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600519 / hk00700 / 600519

| | start | string | 否 | 起始日期 YYYY-MM-DD（可选）

| | end | string | 否 | 结束日期 YYYY-MM-DD（可选）

 `code` string 是
 股票代码：sh600519 / hk00700 / 600519

 `start` string
 起始日期 YYYY-MM-DD（可选）

 `end` string
 结束日期 YYYY-MM-DD（可选）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/buyback",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/buyback?code=sh600667&start=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/consensus` 一致预期（目标价 + 未来盈利预测） [单独看这一页 →](/docs/endpoints/consensus)
 ⭐ **卖方一致预期**：分析师**目标价** + 未来年度/季度预测（EPS / 营收 / 净利润 / 预测 PE·PB·PS / 机构覆盖数）。用户问『机构怎么看这只票/目标价多少/明年利润预测/一致预期』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 股票代码，逗号分隔（≤15 只）：sh600519,sz000001 / hk00700

 `codes` string 是
 股票代码，逗号分隔（≤15 只）：sh600519,sz000001 / hk00700

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/consensus",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/consensus?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/rating` 机构评级（港股 / 美股 · 目标价 + 评级分布） [单独看这一页 →](/docs/endpoints/rating)
 **卖方机构评级**：目标价（均值 / 最高 / 最低）＋ 评级分布（买入 / 增持 / 中性 / 减持 / 卖出 ＋ 覆盖机构数）＋ **评级月度趋势**（含最新一期）。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 代码，逗号分隔：hk00700,usAAPL（仅港股/美股）

 `codes` string 是
 代码，逗号分隔：hk00700,usAAPL（仅港股/美股）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/rating",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/rating?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/disclosure` 财报披露日历（业绩预约披露日） [单独看这一页 →](/docs/endpoints/disclosure)
 **业绩预约披露日**：哪天披露财报（`disclosureDate`）＋ 报告期（`reportEndDate`）＋ 说明文案（`disclosureDesc`）。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 代码，逗号分隔：sh600519 / hk00700 / usAAPL

 `codes` string 是
 代码，逗号分隔：sh600519 / hk00700 / usAAPL

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/disclosure",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/disclosure?codes=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/fund-flow` 个股资金流向（A股 / 港股；沪深支持历史区间） [单独看这一页 →](/docs/endpoints/fund-flow)
 **个股资金流向**：主力/散户的买入、卖出、净额，以及均价与收盘价。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600519 / hk00700

| | start | string | 否 | 沪深历史区间开始 YYYY-MM-DD（与 end 同时提供）

| | end | string | 否 | 沪深历史区间结束 YYYY-MM-DD（与 start 同时提供）

 `code` string 是
 股票代码：sh600519 / hk00700

 `start` string
 沪深历史区间开始 YYYY-MM-DD（与 end 同时提供）

 `end` string
 沪深历史区间结束 YYYY-MM-DD（与 start 同时提供）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/fund-flow?code=sh600667&start=", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/fund-short` 卖空数据（港股 / 美股） [单独看这一页 →](/docs/endpoints/fund-short)
 **卖空数据**：卖空股数 / 卖空金额 / 卖空比率（`ShortShares` / `ShortAmount` / `ShortRatio`）。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：hk00700 / usAAPL

| | date | string | 否 | 指定日期 YYYY-MM-DD（留空=最近）

 `code` string 是
 股票代码：hk00700 / usAAPL

 `date` string
 指定日期 YYYY-MM-DD（留空=最近）

 curl

 ```
# 推荐：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"
```
 Python

 ```
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())
```
 JavaScript

 ```
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());
```

 GET `/v1/fund-south` 南下资金持仓（港股通 · 季度） [单独看这一页 →](/docs/endpoints/fund-south)
 **港股通南下资金持仓**：持股数 / 持股比例 / 持股市值（**季度**口径）。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 港股代码，逗号分隔：hk00700,hk03690

| | date | string | 否 | 季度末日期 YYYY-MM-DD（留空=最近一期）

 `codes` string 是
 港股代码，逗号分隔：hk00700,hk03690

 `date` string
 季度末日期 YYYY-MM-DD（留空=最近一期）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/fund-south",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/index-list` 指数清单（1223 个 · 含港股指数） [单独看这一页 →](/docs/endpoints/index-list)
 **指数全量清单**（1223 个）：`code` / `name`。
 |
| | 参数 | 类型 | 必填 | 说明

| | limit | integer | 否 | 条数（1~500）

| | offset | integer | 否 | 偏移

| | date | string | 否 | 指定日期 YYYY-MM-DD（留空=最新）

 `limit` integer
 条数（1~500）

 `offset` integer
 偏移

 `date` string
 指定日期 YYYY-MM-DD（留空=最新）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/index-list",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/index-list?limit=10", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/score` 股票评分（五维 · 含周月季变动） [单独看这一页 →](/docs/endpoints/score)
 **股票评分**（仅 A 股）：**基本面 / 技术 / 综合 / 资金 / 风险** 五个维度，每维带**周 / 月 / 季变动**。
 |
| | 参数 | 类型 | 必填 | 说明

| | codes | string | 是 | 股票代码，逗号分隔：sh600519,sz000001

| | date | string | 否 | 查询日期 YYYY-MM-DD（留空=最新；最早回溯到 2026-04 下旬）

 `codes` string 是
 股票代码，逗号分隔：sh600519,sz000001

 `date` string
 查询日期 YYYY-MM-DD（留空=最新；最早回溯到 2026-04 下旬）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/score",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"codes": ""},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/report` 研报（列表 / 全文） [单独看这一页 →](/docs/endpoints/report)
 **卖方研报**：**不传 id** ⇒ 列表（研报标题 + 机构 + 评级 + 类型 + 时间）；**传 id** ⇒ ⭐ **研报全文**（Markdown：标题 + 日期/机构 + 正文含财务点评）。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 否 | 股票代码（列表模式必填）：sh600519 / hk00700 / pt01801080（板块）

| | id | string | 否 | 研报 ID（详情模式）：res843401040115 —— 从列表的 `id` 字段取

| | limit | integer | 否 | 列表条数（上限 20）

| | offset | integer | 否 | 列表偏移（翻页）

 `code` string
 股票代码（列表模式必填）：sh600519 / hk00700 / pt01801080（板块）

 `id` string
 研报 ID（详情模式）：res843401040115 —— 从列表的 `id` 字段取

 `limit` integer
 列表条数（上限 20）

 `offset` integer
 列表偏移（翻页）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/report",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/report?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/bond` 可转债条款 [单独看这一页 →](/docs/endpoints/bond)
 可转债完整条款：溢价率、转股价值、双低值、强赎触发价、回售触发价、转股价、正股、到期日、信用评级。code 形如 sh113052。用户问『转债条款/强赎/双低/溢价』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 可转债代码：sh113052 / sz123138

 `code` string 是
 可转债代码：sh113052 / sz123138

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/bond",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/bond?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/etf` ETF 数据（概览/详情/持仓/净值/公司/持有人/财务） [单独看这一页 →](/docs/endpoints/etf)
 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 个主题池）。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | ETF 代码：sh510300

| | kind | string | 否 | 概览(默认)/详情/持仓/净值/公司/持有人/财务

| | start | string | 否 | 仅 kind=净值：起始日 YYYY-MM-DD

| | end | string | 否 | 仅 kind=净值：结束日 YYYY-MM-DD

| | date | string | 否 | 仅 kind=概览/持仓：历史快照日 YYYY-MM-DD（留空=最新）

 `code` string 是
 ETF 代码：sh510300

 `kind` string
 概览(默认)/详情/持仓/净值/公司/持有人/财务

 `start` string
 仅 kind=净值：起始日 YYYY-MM-DD

 `end` string
 仅 kind=净值：结束日 YYYY-MM-DD

 `date` string
 仅 kind=概览/持仓：历史快照日 YYYY-MM-DD（留空=最新）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/etf",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/etf?code=sh600667&kind=daily", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/ipo` 新股日历 [单独看这一页 →](/docs/endpoints/ipo)
 新股发行/申购/中签/上市日历。用户问『新股/打新/IPO』时用。⚠️ **三市场覆盖**：A 股 / **港股** / 美股（数据源 Markets 含三市场）。
 |
| | 参数 | 类型 | 必填 | 说明

| | days | integer | 否 | 查询天数，默认 15

 `days` integer
 查询天数，默认 15

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/ipo",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/ipo?days=15", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/dividend` 分红送转 [单独看这一页 →](/docs/endpoints/dividend)
 分红送转历史（每股分红/送股/除权日）。⚠️ **支持港股**（代码形如 `hk00700`；**实测返回 2 条**）。⚠️ ETF **没有分红明细**（数据源不提供，只有 `/v1/etf?kind=概览` 的 `divTtm`）。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

| | years | integer | 否 | 年数，默认 3

 `code` string 是
 股票代码：sh600667

 `years` integer
 年数，默认 3

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/dividend",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/dividend?code=sh600667&years=3", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/dehydrated` 脱水研报 [单独看这一页 →](/docs/endpoints/dehydrated)
 券商研报脱水摘要。用户问『研报/机构观点/券商怎么说』时用。
 |
| | 参数 | 类型 | 必填 | 说明

| | mode | string | 否 | list 列表 / detail 详情

| | symbol | string | 否 | 股票代码（detail 时用）

| | limit | integer | 否 | 条数，默认 10

 `mode` string
 list 列表 / detail 详情

 `symbol` string
 股票代码（detail 时用）

 `limit` integer
 条数，默认 10

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/dehydrated",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/dehydrated?mode=list", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/profile` 公司简况 [单独看这一页 →](/docs/endpoints/profile)
 公司基本信息：上市日期、主营业务、所属行业。⚠️ **ETF / 指数请改用 /v1/etf?kind=详情 或 /v1/quote** —— 本端点对 ETF 只有 `code`/`name`/`listedDate` 有值，`business`/`industry`/`sector`/`chairman` **数据源本来就没有**（不是取数失败，也不是 ETF 不存在）；ETF 的 64 个字段在 `/v1/etf?kind=详情`。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 是 | 股票代码：sh600667

 `code` string 是
 股票代码：sh600667

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/profile",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"code": "sh600667"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/profile?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/search` 股票搜索（模糊词消歧） [单独看这一页 →](/docs/endpoints/search)
 按名称/代码搜索股票、基金、板块。用户只给名称时**先用这个确认代码**。⚠️ **覆盖 A 股 / 港股 / 美股**（数据源 Markets 含三市场）⇒ `hk00700`、`usAAPL` 都能搜到；港股代码是 **5 位**（`hk00700`），与 A 股 6 位不同。
 |
| | 参数 | 类型 | 必填 | 说明

| | q | string | 是 | 关键词：'太极实业' 或 '600667'

 `q` string 是
 关键词：'太极实业' 或 '600667'

 curl

 ```
# 注：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/search",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={"q": "太极实业"},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
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());
```

 GET `/v1/stocks` 全市场股票清单（代码 / 名称 / 上市日期 / 行业） [单独看这一页 →](/docs/endpoints/stocks)
 **一次拿全 A 股约 5576 只**的清单：代码、名称、市场、上市日期、行业、板块、发行价、注册资本。
 |
| | 参数 | 类型 | 必填 | 说明

| | market | string | 否 | sh 沪 / sz 深 / bj 北（留空=全部）

| | industry | string | 否 | 行业名精确匹配，如 '食品饮料'（留空=全部）

| | limit | integer | 否 | 返回条数，0=全量（约 5576 只）

| | offset | integer | 否 | 跳过前 N 条（翻页）

 `market` string
 sh 沪 / sz 深 / bj 北（留空=全部）

 `industry` string
 行业名精确匹配，如 '食品饮料'（留空=全部）

 `limit` integer
 返回条数，0=全量（约 5576 只）

 `offset` integer
 跳过前 N 条（翻页）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/stocks",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/stocks?market=hs", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/calendar` 投资日历（个股事件） [单独看这一页 →](/docs/endpoints/calendar)
 **个股事件日历**：分红派息 / 解禁 / 财报披露等公司事件排期（不是宏观数据日历——宏观请用 /v1/macro）。
 |
| | 参数 | 类型 | 必填 | 说明

| | date | string | 否 | 窗口起始日 YYYY-MM-DD（留空=今天起）；返回该日起约 1 个月的个股事件

| | limit | integer | 否 | 返回规模（透传数据源；数据源按事件类型分段，各段条数不严格等于该值）

 `date` string
 窗口起始日 YYYY-MM-DD（留空=今天起）；返回该日起约 1 个月的个股事件

 `limit` integer
 返回规模（透传数据源；数据源按事件类型分段，各段条数不严格等于该值）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/calendar",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/calendar?date=2026-09-16", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/margin-trade` 融资融券 [单独看这一页 →](/docs/endpoints/margin-trade)
 个股融资融券明细：融资余额、买入、偿还、融券。**code 必填**（支持批量：`sh600667,sz000651`）；缺 code 会返回明确的说明（不再静默空）；未披露交易日的两融数据数据源会给出原因。⚠️ **ETF 不在两融名单** —— 实测 `sh510300` 无论当日还是历史日（`--date 2026-10-22`）都恒回 `NOT_DISCLOSED`，文案说「尚未披露」但实际是**该标的不属于两融标的**，⛔ 别当数据延迟去重试。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 否 | 股票代码（支持批量逗号分隔）：sh600667 或 sh600667,sz000651

| | date | string | 否 | 日期 YYYY-MM-DD（留空=最近已披露交易日）

 `code` string
 股票代码（支持批量逗号分隔）：sh600667 或 sh600667,sz000651

 `date` string
 日期 YYYY-MM-DD（留空=最近已披露交易日）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/margin-trade",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/margin-trade?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/block-trade` 大宗交易 [单独看这一页 →](/docs/endpoints/block-trade)
 大宗交易记录：成交价、折溢价、成交量、买卖方营业部。
 |
| | 参数 | 类型 | 必填 | 说明

| | code | string | 否 | 股票代码：sh600667

| | date | string | 否 | 日期 YYYY-MM-DD（留空=最近）

 `code` string
 股票代码：sh600667

 `date` string
 日期 YYYY-MM-DD（留空=最近）

 curl

 ```
# 推荐：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"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/block-trade",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/block-trade?code=sh600667", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 GET `/v1/usage` 查询用量与额度 [单独看这一页 →](/docs/endpoints/usage)
 查当前 Key 的今日调用次数、总量剩余（买断档）、到期时间（订阅档）与限流额度。
 curl

 ```
# 推荐：Authorization 头（密钥不进日志）
curl -H "Authorization: Bearer YOUR_KEY" \
 "https://api.ashareapi.com/v1/usage"

# 快速测试：直接浏览器打开（?key= 会留在日志/历史里，别用于生产）
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"
```
 Python

 ```
import requests

r = requests.get(
 "https://api.ashareapi.com/v1/usage",
 headers={"Authorization": "Bearer YOUR_KEY"},
 params={},
 timeout=30,
)
print(r.json())
```
 JavaScript

 ```
const r = await fetch("https://api.ashareapi.com/v1/usage", {
 headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());
```

 还想要什么数据？
 免费端点无需 Key 即可试用；付费端点需要 Key（见定价）。

 [用 MCP 接进 AI Agent](/mcp)[获取 Key](/pricing)
