market-data
它能做什么
这个技能让智能体获取过去的价格,即 OHLCV 或 K 线数据,并展示蜡烛图。适合想获取价格历史或近期价格用于自己分析的人。
适用场景
- ✓你想获取某只股票过去几个月的日线价格历史的时候。
- ✓你想在对话中展示一张 K 线图的时候。
- ✓你需要检查市场数据来源或其新鲜程度的时候。
技能链接
https://github.com/TraderAlice/OpenAlice/blob/master/default/skills/market-data/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请展示 Apple 股票过去几个月的 K 线图。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会为该股票找到确切的数据 ID,下载价格柱及其详细信息,然后展示数据或图表。在呈现之前,它会检查数据的新鲜程度。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Market data and charts
OpenAlice's Market UI and alice market share the same K-line service.
Workspace shells already select their Alice Project. Outside a Workspace, use
openalice exec --project <key> alice market ....
Find and read a series
alice market search-bars --query AAPL
alice market bars --bar-id 'yfinance|AAPL' --interval 1d --count 300 --output bars.json
Copy an exact barId from search results. It identifies a source as well as an
instrument: two feeds for the same symbol are different series. Do not rewrite
native symbols or guess broker account IDs. If source discovery is empty,
alice market vendors shows configured vendor availability.
The result contains bars (OHLCV) and meta. Use the file in local Python,
JavaScript or shell analysis; omit --output for stdout. Existing output files
are not overwritten. alice market bars --help lists window options and an
explicit --asset-class hint for vendor lookups that cannot resolve the class.
The alice-analysis skill covers optional formula and snapshot shortcuts.
Check the returned coverage and freshness metadata, especially the earliest and latest records, fetch time and possible delay. The age of the last bar is not measured feed latency; market closures and bar boundaries matter. Do not present a delayed or historical observation as a live quote.
Show a chart in a reply
Write a market reference directly in reply prose when a chart helps:
[[market/yfinance|AAPL/1d]]
The syntax is [[market/{barId}/{interval}]]. Copy the discovered barId intact,
including any slash in its symbol; the final slash separates the interval.
Intervals are 1m, 5m, 15m, 30m, 1h, 4h, 1d, 1w (availability
varies by source). The reference requests the latest 300 bars, not a saved
snapshot of an earlier analysis.
GUI chat displays a card and opens the interactive chart in the right panel. Supported Connectors such as Telegram send a chart image at that position in the reply, preserving surrounding text order. Put the reference outside code when you want it rendered; code examples remain literal. Failed references do not silently switch feeds. There is no need to generate or attach a chart file.
For broker quotes, contracts, positions or orders, use alice-uta instead.
A market reference only displays data; it does not place a trade.
常见问题
这是实时价格数据吗?
不一定。技能提醒,延迟或过去的价格不应被当作实时报价来呈现。
我怎么知道价格来自哪个数据来源?
每个序列都有自己的 ID,其中注明了来源,因此同一只股票的两个数据源会被分开保存。
我可以把价格数据保存到文件中吗?
可以。技能说明了如何把结果保存到文件,用于本地分析。
详情
作者的原始描述
Use for price history, OHLCV/K-lines, market-data source discovery, or showing a candlestick chart in a conversation. Fetch data for local analysis or share a chart using OpenAlice market references.
repo: TraderAlice/OpenAlice
热度
- GitHub 星标
- 7.4k
- 排名
- #13265
- 许可证
- AGPL-3.0
- 更新时间
- 2026/10/23
评论
- …