查询东财美股历史 OHLC

SkillDev tools

Queries Eastmoney US stock historical daily K-line (candlestick) data. Use when the user needs to query Eastmoney US stock historical daily K-lines; if a date range is given, request in batches of 3-day windows, otherwise fetch the full history; also use when the user wants Eastmoney US stock histor

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 查询东财美股历史 OHLC skill

What this skill tells your AI

The instructions your AI receives, as published by ftshare-lab/ftshare-skill in ftshare-market-data/sub-skills/eastmoney-us-stock-daily-ohlc/SKILL.md and read by ahel’s review.

接口说明

项目说明
接口名称查询东财美股历史日 K 线
外部接口/api/v1/market/data/eastmoney-us-stock-daily-ohlc
请求方式GET
适用场景查询东财美股历史日 K 线;有日期范围时按 3 天窗口分批请求,无日期范围时全量拉取

请求参数

参数名类型是否必填描述取值示例备注
--stock_codestring股票代码AAL东财美股代码
--start_datestring起始日期(含)2026-06-01格式 YYYY-MM-DDYYYYMMDD
--end_datestring截止日期(含)2026-06-10格式 YYYY-MM-DDYYYYMMDD
--pageint页码1从 1 开始,默认 1
--page_sizeint每页条数50默认 50
--allflag全量返回返回全量数据(不分页)

执行策略:有日期范围时,将区间拆分为最多 3 天的窗口分批请求,合并去重排序;无日期范围时全量拉取(不传日期参数)。

查询模式

模式参数说明
全部历史--stock_code全量拉取全部历史 K 线(分页)
日期区间--stock_code --start_date --end_date按 3 天窗口分批请求,合并后分页
日期区间全量--stock_code --start_date --end_date --all按 3 天窗口分批请求,合并后返回全量(不分页)

执行方式

通过根目录的 run.py 调用:

python <RUN_PY> eastmoney-us-stock-daily-ohlc --stock_code AAL --page 1 --page_size 10
python <RUN_PY> eastmoney-us-stock-daily-ohlc --stock_code AAL --start_date 2026-05-01 --end_date 2026-06-10 --page 1 --page_size 50
python <RUN_PY> eastmoney-us-stock-daily-ohlc --stock_code AAL --start_date 2026-05-01 --end_date 2026-06-10 --all

<RUN_PY> 为主 SKILL.md 同级的 run.py 绝对路径,参见主 SKILL.md 的「调用方式」说明。

响应结构

顶层为分页包装对象:

字段名类型描述
codeint业务状态码,成功为 0
messagestring业务消息
dataobject/null分页数据体;无数据时可能为 null
data.pageNumint当前页码
data.pageSizeint每页条数
data.totalint总记录数
data.pagesint总页数
data.recordsarray当前页 K 线列表

data.records[] 单条记录字段(全部字段按字符串返回):

字段名类型描述
secidstring证券 ID,格式 {market}.{code},如 105.ADV
codestring股票代码
namestring股票名称
marketstring市场编号
datestring日期,格式 YYYY-MM-DD
openstring开盘价
closestring收盘价
highstring最高价
lowstring最低价
volumestring成交量
amountstring成交额
amplitudestring振幅
kltstringK 线类型
fqtstring复权类型

响应示例

{
  "code": 0,
  "message": "success",
  "data": {
    "pageNum": 1,
    "pageSize": 50,
    "total": 503,
    "pages": 11,
    "records": [
      {
        "secid": "105.ADV",
        "code": "ADV",
        "name": "Advantage Solutions Inc",
        "market": "105",
        "date": "2021-01-05",
        "open": "12.34",
        "close": "12.56",
        "high": "12.78",
        "low": "12.10",
        "volume": "1234567",
        "amount": "9876543.21",
        "amplitude": "5.5",
        "klt": "101",
        "fqt": "1"
      }
    ]
  }
}

注意事项

  • 有日期范围时,区间拆分为最多 3 天的窗口分别请求,避免服务端大范围 500 错误
  • 无日期范围时,全量拉取全部历史 K 线(单只股票数据量较小,如 AAL ~1365 条)
  • start_date / end_date 支持 YYYY-MM-DDYYYYMMDD 两种格式
  • 记录字段为 snake_case,所有数值字段均为字符串
  • data 在错误或无数据时可能为 null
  • stock_code 为东财美股代码(如 AAL
  • 可先通过 eastmoney-us-stock-list 获取有效的美股代码列表

Signals

GitHub stars
64
Forks
13
Last commit
Sep 2026
Advanced
Catalog kind
skill
Gateway key
eastmoney-us-stock-daily-ohlc
Source
github.com/ftshare-lab/ftshare-skill