File contents 查询单只股票分时价格(一分钟级别)
接口说明
项目
说明
接口名称
查询单只股票分时价格(一分钟级别)
外部接口
/api/v2/stocks/:stock/prices
请求方式
GET
适用场景
获取 A 股指定股票在指定时间范围内的分时数据(一分钟一根),用于分时图、当日/多日走势;每条含该分钟的价格、成交量、成交额、均价、时间戳;支持从今天起、从五日前起、从 N 个交易日前起或从指定毫秒时间戳起;响应含昨收与当前交易日
请求参数
说明:stock 为路径参数(必填);时间范围由 since 或 since_ts_ms 二选一指定(不传 since 时必传 since_ts_ms)。
参数名
类型
是否必填
描述
取值示例
备注
stock
string
是
股票标的键(路径参数,带市场后缀)
688295.XSHG、000001.SZ、920036.BJ
沪 .XSHG、深 .SZ、北交所 .BJ
since
string
条件必填
时间范围起点(语义)
TODAY、FIVE_DAYS_AGO、TRADE_DAYS_AGO(10)
见下方取值说明;与 since_ts_ms 二选一
since_ts_ms
long
条件必填
时间范围起点(毫秒时间戳)
1735689600000
须属于“今天”或“最近一个交易日”;不传 since 时必传
since 取值说明:
取值
含义
TODAY
从今天(或最近一个交易日)的第一条分时数据开始
FIVE_DAYS_AGO
从五个交易日前的第一条分时数据开始(含今天)
TRADE_DAYS_AGO(n)
从 n 个交易日前的第一条分时数据开始(含今天),n 为正整数
执行方式
通过根目录的 run.py 调用(推荐):
# 从今天起的分时
python <RUN_PY> stock-prices --stock 000001.XSHG --since TODAY
# 从五日前起
python <RUN_PY> stock-prices --stock 000001.XSHG --since FIVE_DAYS_AGO
# 从 10 个交易日前起
python <RUN_PY> stock-prices --stock 000001.XSHG --since "TRADE_DAYS_AGO(10)"
# 从指定毫秒时间戳起(不传 since 时必传)
python <RUN_PY> stock-prices --stock 000001.XSHG --since_ts_ms 1735689600000
<RUN_PY> 为主 SKILL.md 同级的 run.py 绝对路径,参见主 SKILL.md 的「调用方式」说明。
响应说明
返回指定股票的分时价格列表、昨收及当前交易日,与代码 GetStockPricesReply 一致:
{
"prices": [ { "p", "v", "t", "a", "tm" }, ... ],
"prev_close": 12.34,
"today": 20250312
}
根字段
字段名
类型
是否可为空
说明
prices
array
否
分时价格列表,按时间正序;单条结构见下表
prev_close
float
是
昨收价(用于分时涨跌幅等计算);无时为 null
today
int
否
当前交易日,YYYYMMDD 格式
分时单条结构(prices 元素,对应 PriceShortKey)
字段名
类型
是否可为空
说明
单位
p
float
否
该分钟价格
元
v
long
否
该分钟成交量
股
t
float
否
该分钟成交额
元
a
float
是
该分钟均价(若有)
元
tm
long
否
该分钟对应时间戳(毫秒)
ms
注意事项
stock 为必填;since 与 since_ts_ms 二选一,必须提供其一
股票代码需携带市场后缀:沪市 .XSHG、深市 .SZ、北交所 .BJ
since 为 TRADE_DAYS_AGO(n) 时需带括号和数字,如 TRADE_DAYS_AGO(10)
所有接口请求需携带 X-Client-Name: ft-web 请求头
1 --- 2 name: stock-prices-2 3 description: 查询单只股票分时价格(一分钟级别) 4 --- 5 # 查询单只股票分时价格(一分钟级别) 6 7 ## 接口说明 8 9 | 项目 | 说明 | 10 |----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 11 | 接口名称 | 查询单只股票分时价格(一分钟级别) | 12 | 外部接口 | /api/v2/stocks/:stock/prices | 13 | 请求方式 | GET | 14 | 适用场景 | 获取 A 股指定股票在指定时间范围内的分时数据(一分钟一根),用于分时图、当日/多日走势;每条含该分钟的价格、成交量、成交额、均价、时间戳;支持从今天起、从五日前起、从 N 个交易日前起或从指定毫秒时间戳起;响应含昨收与当前交易日 | 15 16 ## 请求参数 17 18 说明:stock 为路径参数(必填);时间范围由 since 或 since_ts_ms 二选一指定(不传 since 时必传 since_ts_ms)。 19 20 | 参数名 | 类型 | 是否必填 | 描述 | 取值示例 | 备注 | 21 |-------------|--------|----------|---------------------------------|----------------------------------------|--------------------------------------------------| 22 | stock | string | 是 | 股票标的键(路径参数,带市场后缀) | 688295.XSHG、000001.SZ、920036.BJ | 沪 .XSHG、深 .SZ、北交所 .BJ | 23 | since | string | 条件必填 | 时间范围起点(语义) | TODAY、FIVE_DAYS_AGO、TRADE_DAYS_AGO(10) | 见下方取值说明;与 since_ts_ms 二选一 | 24 | since_ts_ms | long | 条件必填 | 时间范围起点(毫秒时间戳) | 1735689600000 | 须属于“今天”或“最近一个交易日”;不传 since 时必传 | 25 26 since 取值说明: 27 28 | 取值 | 含义 | 29 |-------------------|--------------------------------------------------------| 30 | TODAY | 从今天(或最近一个交易日)的第一条分时数据开始 | 31 | FIVE_DAYS_AGO | 从五个交易日前的第一条分时数据开始(含今天) | 32 | TRADE_DAYS_AGO(n) | 从 n 个交易日前的第一条分时数据开始(含今天),n 为正整数 | 33 34 ## 执行方式 35 36 通过根目录的 `run.py` 调用(推荐): 37 38 ```bash 39 # 从今天起的分时 40 python <RUN_PY> stock-prices --stock 000001.XSHG --since TODAY 41 42 # 从五日前起 43 python <RUN_PY> stock-prices --stock 000001.XSHG --since FIVE_DAYS_AGO 44 45 # 从 10 个交易日前起 46 python <RUN_PY> stock-prices --stock 000001.XSHG --since "TRADE_DAYS_AGO(10)" 47 48 # 从指定毫秒时间戳起(不传 since 时必传) 49 python <RUN_PY> stock-prices --stock 000001.XSHG --since_ts_ms 1735689600000 50 ``` 51 52 > `<RUN_PY>` 为主 SKILL.md 同级的 `run.py` 绝对路径,参见主 SKILL.md 的「调用方式」说明。 53 54 ## 响应说明 55 56 返回指定股票的分时价格列表、昨收及当前交易日,与代码 GetStockPricesReply 一致: 57 58 ```json 59 { 60 "prices": [ { "p", "v", "t", "a", "tm" }, ... ], 61 "prev_close": 12.34, 62 "today": 20250312 63 } 64 ``` 65 66 ### 根字段 67 68 | 字段名 | 类型 | 是否可为空 | 说明 | 69 |------------|-------|------------|------------------------------------------| 70 | prices | array | 否 | 分时价格列表,按时间正序;单条结构见下表 | 71 | prev_close | float | 是 | 昨收价(用于分时涨跌幅等计算);无时为 null | 72 | today | int | 否 | 当前交易日,YYYYMMDD 格式 | 73 74 ### 分时单条结构(prices 元素,对应 PriceShortKey) 75 76 | 字段名 | 类型 | 是否可为空 | 说明 | 单位 | 77 |--------|-------|------------|------------------------|------| 78 | p | float | 否 | 该分钟价格 | 元 | 79 | v | long | 否 | 该分钟成交量 | 股 | 80 | t | float | 否 | 该分钟成交额 | 元 | 81 | a | float | 是 | 该分钟均价(若有) | 元 | 82 | tm | long | 否 | 该分钟对应时间戳(毫秒) | ms | 83 84 ## 注意事项 85 86 - stock 为必填;since 与 since_ts_ms 二选一,必须提供其一 87 - 股票代码需携带市场后缀:沪市 .XSHG、深市 .SZ、北交所 .BJ 88 - since 为 TRADE_DAYS_AGO(n) 时需带括号和数字,如 TRADE_DAYS_AGO(10) 89 - 所有接口请求需携带 X-Client-Name: ft-web 请求头
dvcrn/openclaw-skills-marketplace/tree/main/plugins/shawn92--ftshare-kline-data/skills/ftshare-kline-data/sub-skills/stock-prices commit f7f903b5e1
Frequently asked questions How do I install the Stock Prices skill? Run npx skillmds@latest add dvcrn/stock-prices-2 in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
What does the Stock Prices skill do? 查询单只股票分时价格(一分钟级别) It is listed under Coding & Dev Tools on SkillMD.
Is Stock Prices safe to use? This skill has not completed SkillMD's automated safety review yet. Independent scanners report: SkillSpector: PASS, Skill Scanner: PASS. Capability flags: executes scripts. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
Which AI agents work with Stock Prices? This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Is Stock Prices free to use? Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
Who published Stock Prices? dvcrn (@dvcrn) published this skill. Their other Agent Skills are listed on their SkillMD profile.