共 28 个端点

端点清单

分组:免费 6 个 · 付费 22 个。含参数说明与 curl / Python / JS 示例。

本页由 /openapi.json 自动生成 (来源 live · 2026-09-16 04:44:17)—— 与 API 永远同步。

免费6 个

GET/v1/health服务健康检查

检查服务状态与数据通道是否正常(go_cli / npm_cli 都为 true 表示两个数据 CLI 就绪)。

curl
curl "https://api.ashareapi.com/v1/health?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/health",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/health?key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/quote实时行情快照

A股/港股/美股实时行情:现价、开高低、成交量、成交额、换手率。用户问『某股票现在多少钱/什么价/现价』时用这个。

参数类型必填说明
codestring股票代码,带市场前缀:sh600667(沪)/ sz000001(深)/ hk00700(港)/ usAAPL(美)
curl
curl "https://api.ashareapi.com/v1/quote?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/quote",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/quote?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/klineK线(日/周/月)

历史 K 线数据。用户问『走势/最近表现/历史K线/趋势』时用这个。

参数类型必填说明
codestring股票代码:sh600667
periodstring周期:day 日线 / week 周线 / month 月线
countinteger返回条数,默认 30
curl
curl "https://api.ashareapi.com/v1/kline?code=sh600667&period=day&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/kline",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/kline?code=sh600667&period=day&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/hot热搜榜

全市场热搜榜(A股/美股/ETF 关注度排名 + 涨跌幅)。用户问『什么股票热门/大家在看什么/热度榜』时用这个。

参数类型必填说明
limitinteger返回条数,默认 30
curl
curl "https://api.ashareapi.com/v1/hot?limit=10&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/hot",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/hot?limit=10&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/market-overview市场总览(大盘画像)

市场整体画像。type=summary 总评画像 / trade 收盘 / interval 多周期 / technical 大盘技术 / updown 涨跌分布 / margin 两融 / valuation 估值分位 / rotation 风格轮动。用户问『今天市场怎么样/大盘情况/市场环境』时用这个。

参数类型必填说明
typestring类型:summary/trade/interval/technical/updown/margin/valuation/rotation
curl
curl "https://api.ashareapi.com/v1/market-overview?type=institution&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/market-overview",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/market-overview?type=institution&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/changedist涨跌分布(市场广度)

全市场涨跌家数、涨跌停家数、成交额——衡量市场广度与情绪。

curl
curl "https://api.ashareapi.com/v1/changedist?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/changedist",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/changedist?key=YOUR_KEY",
);
console.log(await r.json());

付费22 个

GET/v1/finance财务报表

财务报表三件套:利润表 / 资产负债表 / 现金流量表(多期)。用户问『营收/净利润/毛利率/负债/财务数据』时用。

参数类型必填说明
codestring股票代码:sh600667
numinteger返回期数,默认 4 期
curl
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",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/finance?code=sh600667&num=4&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/fund个股资金+龙虎榜+大宗+两融(综合)

一个接口拿全交易面:主力资金(当日/5/10/20 日净流入 + 全市场排名)、龙虎榜(上榜原因/买卖总额/营业部明细)、大宗交易、融资融券。用户问『主力资金/资金流/龙虎榜/机构动向』时优先用这个。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/fund",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/fund?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/technical技术指标

技术指标全家桶:MA / MACD / KDJ / RSI / BOLL。用户问『技术面/指标/金叉死叉/超买超卖』时用。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/technical?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/technical",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/technical?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/shareholder股东研究

十大股东 / 股东户数(筹码集中度)/ 机构持仓。用户问『谁在持有/股东变化/筹码集中/机构持仓』时用。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/shareholder",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/shareholder?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/chip筹码分布/成本

筹码分布与持仓成本分析(获利盘/套牢盘比例)。用户问『筹码/成本分布/套牢』时用。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/chip?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/chip",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/chip?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/events个股事件标签(42 类)

个股事件总览:大宗交易/龙虎榜/回购/定增/分红/业绩/解禁等 42 类事件标签。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/events",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/events?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/lhb龙虎榜分榜

龙虎榜按类型分榜:institution 机构榜(机构买入/净买/机构数)/ hotmoney 游资榜 / activeseat 活跃席位。用户问『龙虎榜/机构买了什么/游资动向』时用。

参数类型必填说明
typestring榜单类型:institution 机构 / hotmoney 游资 / activeseat 活跃席位
datestring日期 YYYY-MM-DD(留空=最近交易日)
curl
curl "https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/lhb",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/lhb?type=institution&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/screen因子选股(量化筛股)

按因子表达式筛选全市场股票。expr 是多因子交集,例如:intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])。常用因子:PE_TTM/PB/PS_TTM/TotalMV/DividendRatioTTM(估值)· ROE/ROETTM/ROIC/GrossIncomeRatioTTM/NetProfitRatioTTM(盈利)· OperatingRevenueGrowRate/NPParentCompanyYOY(成长)· CurrentRatio/DebtAssetsRatio/NAPS(负债)· NetOperateCashFlowTTM(现金流)。用户问『筛选股票/符合条件的股票/低估高ROE』时用这个。

参数类型必填说明
exprstring因子表达式,如 intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])
presetstring预设名(与 expr 二选一):LowPE/LowPB/HighDividend/PEG/HighROE 等 22 个
limitinteger返回条数,默认 20
orderbystring排序字段(如 ROETTM)
descbooleanTrue 降序 / False 升序
marketstring市场:hs 沪深 / hk 港股 / us 美股(留空=沪深)
curl
curl "https://api.ashareapi.com/v1/screen?expr=intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/screen",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/screen?expr=intersect([PE_TTM > 0, PE_TTM < 20, ROETTM > 15])&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/sector板块行情榜

行业/概念/地域板块涨幅榜 + 领涨股。用户问『哪些板块在涨/板块轮动/行业热度』时用。

curl
curl "https://api.ashareapi.com/v1/sector?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/sector",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/sector?key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/sector-valuation板块估值(含历史百分位)

申万板块 PE/PB/PS/PCF + 股息率 + 历史百分位。code 形如 pt01801780。用户问『某板块贵不贵/估值分位』时用。

参数类型必填说明
codestring申万板块代码:pt01801780
curl
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",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/sector-valuation?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/macro宏观数据

全球宏观指标:GDP/CPI/PMI/LPR/国债收益率/财政等。用户问『宏观/经济数据/利率/LPR/CPI』时用。

参数类型必填说明
regionstring地区:cn 中国 / us 美国 / jp 日本 / eu 欧洲 / hk 香港
namesstring指标短名(如 cn_gdp / cn_cpi_ppi / cn_lpr / us_inflation);留空=该地区全套
curl
curl "https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/macro",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/macro?region=cn&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/bond可转债条款

可转债完整条款:溢价率、转股价值、双低值、强赎触发价、回售触发价、转股价、正股、到期日、信用评级。code 形如 sh113052。用户问『转债条款/强赎/双低/溢价』时用。

参数类型必填说明
codestring可转债代码:sh113052 / sz123138
curl
curl "https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/bond",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/bond?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/etfETF 概览

ETF 行情/规模/溢折率/资金流。code 形如 sh510300。用户问『ETF』时用。

参数类型必填说明
codestringETF 代码:sh510300
curl
curl "https://api.ashareapi.com/v1/etf?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/etf",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/etf?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/ipo新股日历

新股发行/申购/中签/上市日历。用户问『新股/打新/IPO』时用。

参数类型必填说明
daysinteger查询天数,默认 15
curl
curl "https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/ipo",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/ipo?days=15&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/dividend分红送转

分红送转历史(每股分红/送股/除权日)。

参数类型必填说明
codestring股票代码:sh600667
yearsinteger年数,默认 3
curl
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",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/dividend?code=sh600667&years=3&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/dehydrated脱水研报

券商研报脱水摘要。用户问『研报/机构观点/券商怎么说』时用。

参数类型必填说明
modestringlist 列表 / detail 详情
symbolstring股票代码(detail 时用)
limitinteger条数,默认 10
curl
curl "https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/dehydrated",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/dehydrated?mode=list&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/profile公司简况

公司基本信息:上市日期、主营业务、所属行业。

参数类型必填说明
codestring股票代码:sh600667
curl
curl "https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/profile",
    params={"key": "YOUR_KEY", "code": "sh600667"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/profile?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/search股票搜索(模糊词消歧)

按名称/代码搜索股票、基金、板块。用户只给名称时**先用这个确认代码**。

参数类型必填说明
qstring关键词:'太极实业' 或 '600667'
curl
curl "https://api.ashareapi.com/v1/search?q=太极实业&key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/search",
    params={"key": "YOUR_KEY", "q": "太极实业"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/search?q=太极实业&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/calendar财经日历

财经事件日历(宏观数据发布、重要事件排期)。

参数类型必填说明
datestring日期 YYYY-MM-DD(留空=最近)
limitinteger条数,默认 20
curl
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",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/calendar?date=2026-09-16&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/margin-trade融资融券

个股融资融券明细:融资余额、买入、偿还、融券。

参数类型必填说明
codestring股票代码:sh600667
datestring日期 YYYY-MM-DD(留空=最近)
curl
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",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/margin-trade?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/block-trade大宗交易

大宗交易记录:成交价、折溢价、成交量、买卖方营业部。

参数类型必填说明
codestring股票代码:sh600667
datestring日期 YYYY-MM-DD(留空=最近)
curl
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",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/block-trade?code=sh600667&key=YOUR_KEY",
);
console.log(await r.json());
GET/v1/usage查询用量与额度

查当前 Key 的今日调用次数、所在档位与每日额度。

curl
curl "https://api.ashareapi.com/v1/usage?key=YOUR_KEY"
Python
import requests

r = requests.get(
    "https://api.ashareapi.com/v1/usage",
    params={"key": "YOUR_KEY"},
    timeout=30,
)
print(r.json())
JavaScript
const r = await fetch(
  "https://api.ashareapi.com/v1/usage?key=YOUR_KEY",
);
console.log(await r.json());
还想要什么数据?

免费端点无需 Key 即可试用;付费端点需要 Key(见定价)。