Skip to main content

candlesticks

Interactive candlestick and volume Canvas for mainland stocks. Use when the user wants to inspect K-line data, select candle ranges, or ask the LLM to analyze a visible chart range.

跳到安装

来源信息

仓库
FTShare-Lab/ft-tui-kit
最近来源活动
2026年8月10日 15:16
检测到的 SKILL.md 语言
英语
星标
4
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
candlesticks
description
Interactive candlestick and volume Canvas for mainland stocks. Use when the user wants to inspect K-line data, select candle ranges, or ask the LLM to analyze a visible chart range.
# Candlesticks Canvas The `candlesticks` renderer provides the `kline` scenario. ## Spawn `config` is a JSON string. It must contain exactly one stock identifier field: - `tag` - `code`, an alias of `tag` Do not provide both fields. ```typescript canvas_spawn({ kind: 'candlesticks', scenario: 'kline', config: JSON.stringify({ code: '000001.SZ', interval_unit: 'Day', interval_value: 1, adjust_kind: 'None', limit: 120, }), }); ``` Valid mainland identifiers use a six-digit code and an exchange suffix, for example `000001.SZ`, `600519.SH`, or a valid Beijing exchange code ending in `.BJ`. Optional config fields: - `data_file`: absolute JSON or CSV OHLCV file path - `interval_unit`: `Minute`, `Day`, `Week`, `Month`, or `Year` - `interval_value`: positive interval multiplier - `adjust_kind`: `None`, `Forward`, or `Backward` - `limit`: number of candles, from 1 to 2000 ## Config Recovery `canvas_spawn` waits for candlesticks to validate the config and load its data. When it returns `success: false`, read `id` and `error`, correct the reported field, and call `canvas_update` for that same ID. Do not call `canvas_spawn` again unless the original Canvas was closed. ```typescript canvas_update({ id: 'candlesticks-...', config: JSON.stringify({ code: '000001.SZ' }), }); ``` `canvas_update` also waits for the renderer and returns `success: false` with the exact error when the replacement config or its data cannot be applied. Config errors are not delivered as actions. ## Interaction - Click a candle to select it. - Press `a` to attach summarized chart context to the next user prompt. - Press Enter to ask the LLM to analyze the selected or visible range. - Press `e` to export the visible range as a JSON artifact. When `canvas_wait` is available, call it with this Canvas ID while waiting for an interactive selection or analysis request. Otherwise, rely on the host's automatic Canvas event delivery.
在 GitHub 查看