异动 / 偏离值(监管异动体系) API
短线监管异动 / 偏离值:触发「严重异动」、「10日100% 偏离」、异动盯盘名单、严重异动提醒。这是短线风控的关键信号(个股因连续大涨/大跌被交易所或数据方标记异动)。 `mode` 取值: · `deviation` 偏离值热门榜(今日实时)—— 触发偏离阈值的个股,含 `reason` 规则 / `pct` 涨幅 / `turnover` 换手 / `board_desc` 连板 / `concepts` 概念 / `window` 窗口 · `deviation_hist` 偏离值热门榜(历史)—— 需 `date`(YYYY-MM-DD,真实交易日) · `deviation_plan` 偏离值(今日 + 明日两组)—— 返回行数组,每行含 `group`(`today`/`tomorrow`)区分 · `abnormal` 异动频率(含异动原因)—— 需 `date`;⭐ 每日全量(常见 500+ 条),含 `reason` 规则 / `status` 异动状态 / `abn_start` 异动起始日;顶层附 `total` 当日总条数 · `watch` 异动盯盘名单(今日)—— 监控中的个股 + `watch_start`/`watch_end` · `watch_hist` 异动盯盘名单(历史)—— 需 `date` · `alert` 严重异动提醒(今日)—— ⭐ 短线重点:`reason` 为人读提醒原因(如「10日内3次异动个股」「10日内偏离值临近100%」)+ `price` 现价 字段口径(各 mode 按需返回下列子集): `code` 代码 · `name` 名称 · `reason` 触发/提醒原因 · `pct` 涨跌幅% · `board_desc` 连板描述 · `concepts` 概念(顿号分隔)· `turnover` 换手%(偏离榜)· `window` 偏离窗口(如 `10日`)· `rule2` 第二条规则 · `trigger_pct` 触发严重异动阈值% · `limit_price` 参考价 · `status` 异动状态(如「未触发异动」)· `date` 数据日期 · `price` 现价 · `abn_start` 异动起始日(未触发为 `0000-00-00`)· `group` 分组(仅 plan)· `watch_start`/`watch_end` 监控起止(仅 watch)。 ⚠️ 历史类 mode(`deviation_hist`/`abnormal`/`watch_hist`)的 `date` 须为真实交易日(非交易日返回空);缺省用今天。 ⚠️ `abnormal` 默认返回当日全量(`limit` 可调,默认 600,足以覆盖)。 ⚠️ `data` 恒为行数组(可直接落 DataFrame);`abnormal` 的当日总条数在顶层 `total`。
GET /v1/abnormalGET /v1/abnormal?mode=listcurl "https://api.ashareapi.com/v1/abnormal?mode=list&key=YOUR_KEY"mode · date · limit* = requiredQuick start
Replace the key below with yours (free endpoints need no key):
# 推荐:Authorization 头(密钥不进日志)
curl -H "Authorization: Bearer YOUR_KEY" \
"https://api.ashareapi.com/v1/abnormal?mode=list"
# 快速测试:直接浏览器打开(?key= 会留在日志/历史里,别用于生产)
curl "https://api.ashareapi.com/v1/abnormal?mode=list&key=YOUR_KEY"import requests
r = requests.get(
"https://api.ashareapi.com/v1/abnormal",
headers={"Authorization": "Bearer YOUR_KEY"},
params={},
timeout=30,
)
print(r.json())const r = await fetch("https://api.ashareapi.com/v1/abnormal?mode=list", {
headers: { Authorization: "Bearer YOUR_KEY" },
});
console.log(await r.json());Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| mode | string | No | list or detail |
| date | string | No | Date YYYY-MM-DD (blank = latest trading day) |
| limit | integer | No | Number of rows, default 30 |
modestringdatestringlimitintegerUnified envelope: { ok, endpoint, tier, elapsed_ms, source, data }
Rows live in `data`; when upstream returns nothing you get `ok:false` and the call is not counted.
Free endpoints need no key (anonymous 5/min — 250 bars per request, 100k rows per day; solve one PoW challenge for 15/min). Paid tiers: Trial 30 · Standard 120 · Pro 300 · Unlimited 600 per minute; buyout packs are capped by total calls and never expire.
See the error code table →FAQ
General (applies to every endpoint)
Free endpoints do not: health, challenge, quote, kline, hot, market-overview and changedist work anonymously. Paid endpoints do: send `Authorization: Bearer
No. When the upstream fails or returns nothing you get `ok:false` and the charge for that call is refunded (total_calls / usage_log / ep_log are rolled back together). Only calls that actually returned data count.
Quotes (quote / kline / orderbook / changedist) are real-time or current session; financials, shareholders, dividends and events are within T+1 of upstream disclosure. The `source` field in every response tells you which data channel actually served it.
No. `code` is a single-value parameter — one stock per call. For batches, issue concurrent calls and respect your tier per-minute limit.
Set up MCP once, then just ask the AI — it calls the endpoint itself. MCP exposes 36 tools covering quotes, financials, screening, sectors and macro.
Related endpoints
Set up MCP once, then just ask the AI — it calls the endpoint itself.