Agent skill

Real-Time Stock Quote Subscriber

by Yourdaylight in Yourdaylight/stock_datasource

Streams live A-share, Hong Kong and ETF quotes from a receiver node over a local WebSocket server, with built-in price and volume alert rules.

MITAuto-check passedBusiness, Finance & HR

SKILL.md written in Chinese; this summary is our English description.

Install Real-Time Stock Quote Subscriber

skills CLI
$ npx skills add Yourdaylight/stock_datasource --skill stock-rt-subscribe -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install Yourdaylight/stock_datasource stock-rt-subscribe --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/Yourdaylight/stock_datasource.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/stock-rt-subscribe .claude/skills/stock-rt-subscribe && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
stock-rt-subscribe
GitHub stars
189
Token cost
~559 tokens
SKILL.md length
34 words
Files
7 (incl. scripts, references)
Skills in repo
5
Repo updated
First seen
Licence
MIT

At a glance

Streams live A-share, Hong Kong and ETF quotes from a receiver node over a local WebSocket server, with built-in price and volume alert rules.

  • Monitoring live prices for a watchlist of A-shares or Hong Kong stocks
  • SKILL.md covers 架构, 环境准备, 快速开始 and 告警策略, plus 1 more section
  • Runs Python scripts from its folder; calls python3 and pip; needs STOCK_RT_TOKEN
  • Setting up price, volume or breakout alerts on streaming quotes

What it does

Written in Chinese, this skill sets up a WebSocket long connection for real-time quotes on A-shares, Hong Kong stocks and ETFs, refreshed every few seconds. A script polls a receiver node's HTTP API and pushes updates to a local WebSocket server that clients and agents connect to.

Setup is a pip install of requests and websockets plus a node URL environment variable and an optional token. A one-shot mode checks connectivity, a server mode streams subscribed symbols, and Python classes allow starting the server from code or plugging it into an agent. Four built-in alert strategies cover limit-up and limit-down, moves of 5% or more, volume spikes against the recent average, and breakouts above the 20-day high.

A reference file documents the WebSocket message format, data fields, client examples in Python, JavaScript and wscat, dynamic subscription commands and troubleshooting, and a JSON file holds the alert configuration.

When your agent uses it

  • Monitoring live prices for a watchlist of A-shares or Hong Kong stocks
  • Setting up price, volume or breakout alerts on streaming quotes
  • Streaming minute-level data into an agent or local dashboard

Example prompts

  • “Subscribe to 00700.HK and 600519.SH and print the first quote to check the connection.”
  • “Start the WebSocket server for three symbols and alert me on any move of 5% or more.”
  • “Connect an agent to the local quote stream and summarize volume spikes.”

Requirements

  • Python with requests and websockets
  • A receiver node URL set in STOCK_RT_NODE_URL, plus a token if the node requires one

What it can do on your machine

Read from SKILL.md and the folder at commit 3d4dbd2. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 4 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use pip, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • STOCK_RT_TOKEN

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Real-Time Stock Quote Subscriber loads about 559 tokens when it runs, and up to ~2.3k if it reads all its reference files. Until then it costs about 99 tokens; SKILL.md has 34 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~99
When it runs · the whole SKILL.md, loaded when a task matches
~559
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from Yourdaylight/stock_datasource at commit 3d4dbd2, republished under its MIT licence (© Yourdaylight). 34 words, ~559 tokens.

Download SKILL.mdSave it as .claude/skills/stock-rt-subscribe/SKILL.md (or your agent's skills folder). This skill also uses 6 other files; get the full folder from GitHub.
name
stock-rt-subscribe
description
Subscribe to real-time stock market data via WebSocket long connection from receiver nodes (A-shares, HK stocks, ETFs). Use this skill when the user wants to monitor live stock prices, set up real-time alerts, or stream minute-level K-line data. The skill provides a WebSocket server that connects to receiver nodes and pushes real-time price updates to all connected clients.

实时股票数据订阅(WebSocket)

通过 WebSocket 长连接 实时接收 A 股、港股、ETF 行情数据,每 3~5 秒更新一次。

架构

Receiver Node (HTTP API) → scripts/subscribe_client.py → ws://localhost:8765 → 客户端

环境准备

bash
pip install requests websockets
export STOCK_RT_NODE_URL="http://your-node:9100"
export STOCK_RT_TOKEN="your-token"   # 可选,有鉴权时设置

快速开始

一次性查询(验证连通性)
bash
python3 scripts/subscribe_client.py --symbols 00700.HK 600519.SH --once
启动 WebSocket 推送服务
bash
# 基础订阅
python3 scripts/subscribe_client.py --symbols 00700.HK 09988.HK 600519.SH

# 指定节点和端口
python3 scripts/subscribe_client.py --node-url http://your-node:9100 --ws-port 8765 --symbols 00700.HK

# 涨跌幅告警(±2% 触发)
python3 scripts/subscribe_client.py --symbols 00700.HK --alert-pct 2.0

# 输出到文件
python3 scripts/subscribe_client.py --symbols 00700.HK --output ticks.jsonl
编程方式启动
python
from scripts.subscribe_client import StockWSServer

server = StockWSServer(
    node_url="http://your-node:9100",
    symbols=["00700.HK", "09988.HK"],
    poll_interval=3.0,
)
server.add_callback(lambda sym, tick: print(f"{tick.name}: {tick.close}"))
server.run(port=8765)
AI Agent 集成
python
from scripts.ai_agent_integration import StockDataAgent

agent = StockDataAgent()
agent.install()  # 检查依赖、验证节点连通性

# 完整工作流(订阅 + 告警监控 60 秒)
import asyncio
asyncio.run(agent.complete_workflow(['00700.HK', '600519.SH'], duration=60))

告警策略

告警规则配置见 references/strategy_config.json,内置策略:

  • limit_up_down:涨停/跌停监控
  • big_move:大幅波动(≥ ±5%)
  • vol_spike:成交量异动(≥ 近5日均量3倍)
  • price_breakout:价格突破近20日高点

参考文档

© Yourdaylight, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 6 other files (scripts, references) in skills/stock-rt-subscribe of Yourdaylight/stock_datasource.

  • SKILL.md
  • references/api.md
  • references/strategy_config.json
  • scripts/ai_agent_integration.py
  • scripts/alert_engine.py
  • scripts/strategy_engine.py
  • scripts/subscribe_client.py

Open the folder on GitHubat commit 3d4dbd2

Compare with similar skills

Real-Time Stock Quote Subscriber next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Real-Time Stock Quote Subscriber compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Real-Time Stock Quote Subscriber this skillYourdaylight/stock_datasource189—~559Automated safety check: PassMIT
Web3 PolymarketPolymarket/agent-skills1911 repos~2kAutomated safety check: PassNone
Cryptofeed2025Emma/vibe-coding-cn23k1 repos~1.6kAutomated safety check: PassMIT
Tiger Brokers OpenAPI SDKqusong0627/QuantMind1.7k—~1.4kAutomated safety check: PassApache-2.0
Feedsalsk1992/CloddsBot2.9k—~1.8kAutomated safety check: PassMIT
Alpaca Broker Market Dataalpacahq/alpaca-skills154—~2.3kAutomated safety check: PassApache-2.0

Similar skills

  • Web3 Polymarket

    Polymarket/agent-skills

    Polymarket integration for prediction market trading on Polygon.

    191 GitHub starsUsed in 1 repo~2k tokens
    Backend & APIsAuto-check passed
  • Cryptofeed

    2025Emma/vibe-coding-cn

    Cryptofeed - Real-time cryptocurrency market data feeds from 40+ exchanges.

    23k GitHub starsUsed in 1 repo~1.6k tokens
    Backend & APIsAuto-check passed
  • Tiger Brokers OpenAPI SDK

    qusong0627/QuantMind

    Covers the Tiger Brokers OpenAPI Python SDK for market data, stock, futures and options trading, push subscriptions, a CLI and an MCP server, defaulting to paper trading.

    1.7k GitHub stars~1.4k tokensUpdated today
    Business, Finance & HRAuto-check passed
  • Feeds

    alsk1992/CloddsBot

    Real-time market data feeds from 8 prediction market platforms

    2.9k GitHub stars~1.8k tokensUpdated 6 days ago
    Business, Finance & HRAuto-check passed
  • Alpaca Broker Market Data

    alpacahq/alpaca-skills

    Pull and stream US stock market data from Alpaca — REST snapshots/bars/trades/quotes, historical bars with timeframes and feeds (IEX vs SIP), the assets master list, market clock & calendar, news…

    154 GitHub stars~2.3k tokensUpdated 1 mo ago
    Business, Finance & HRAuto-check passed
  • Eastmoney Market Data

    HKUDS/Vibe-Trading

    Index of Eastmoney's free, no-token market data interfaces for China A-shares and Hong Kong stocks: fund flows, dragon-tiger lists, margin trading, reports and news.

    35k GitHub stars~1k tokensUpdated today
    Business, Finance & HRAuto-check passed

More from Yourdaylight/stock_datasource

  • Tushare Plugin Builder

    Yourdaylight/stock_datasource

    Turns a Tushare API doc URL into a full data plugin for the stock_datasource repo: extractor, ClickHouse schema, query service, config and curl examples.

    189 GitHub stars~2.5k tokensUpdated 1 mo ago
    Auto-check passed
  • MCP API Key Authentication

    Yourdaylight/stock_datasource

    Sets up and troubleshoots MCP API key authentication for a stock data service, covering key creation, client configuration and per-tool usage statistics.

    189 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check passed
  • Stock Market Data MCP Query

    Yourdaylight/stock_datasource

    Queries historical A-share, Hong Kong stock, ETF and index data through an MCP server: daily K-lines, financial statements, market indicators and screening.

    189 GitHub stars~1.1k tokensUpdated 1 mo ago
    Auto-check passed
  • Stock Data Assistant

    Yourdaylight/stock_datasource

    Queries A-share, Hong Kong, ETF and index market data over MCP, streams live quotes by WebSocket, and lets you drive both from WeChat through picoclaw.

    189 GitHub stars~1.2k tokensUpdated 1 mo ago
    Auto-check: notes

Works with

Questions about Real-Time Stock Quote Subscriber

What does Real-Time Stock Quote Subscriber do?

Streams live A-share, Hong Kong and ETF quotes from a receiver node over a local WebSocket server, with built-in price and volume alert rules. Written in Chinese, this skill sets up a WebSocket long connection for real-time quotes on A-shares, Hong Kong stocks and ETFs, refreshed every few seconds. A script polls a receiver node's HTTP API and pushes updates to a local WebSocket server that clients and agents connect to.

When should I use Real-Time Stock Quote Subscriber?

Real-Time Stock Quote Subscriber fits situations like: monitoring live prices for a watchlist of A-shares or Hong Kong stocks; setting up price, volume or breakout alerts on streaming quotes; streaming minute-level data into an agent or local dashboard.

How do I install Real-Time Stock Quote Subscriber in Claude Code?

Run `npx skills add Yourdaylight/stock_datasource --skill stock-rt-subscribe -a claude-code`. Or copy the skill folder (skills/stock-rt-subscribe in Yourdaylight/stock_datasource) into .claude/skills/stock-rt-subscribe in your project. Claude Code loads it when a task matches its description.

How do I install Real-Time Stock Quote Subscriber in Codex?

Run `npx skills add Yourdaylight/stock_datasource --skill stock-rt-subscribe -a codex`. Or copy the skill folder (skills/stock-rt-subscribe in Yourdaylight/stock_datasource) into .agents/skills/stock-rt-subscribe in your project. Codex loads it when a task matches its description.

Can I use Real-Time Stock Quote Subscriber in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add Yourdaylight/stock_datasource --skill stock-rt-subscribe -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/stock-rt-subscribe, .gemini/skills/stock-rt-subscribe, .github/skills/stock-rt-subscribe and .opencode/skills/stock-rt-subscribe in your project.

What does Real-Time Stock Quote Subscriber need to run?

Going by SKILL.md and its folder, Real-Time Stock Quote Subscriber needs Python for the scripts in its folder, the command-line tools its instructions call (python3 and pip) and credentials named STOCK_RT_TOKEN. Our summary lists: Python with requests and websockets; A receiver node URL set in STOCK_RT_NODE_URL, plus a token if the node requires one.

Does Real-Time Stock Quote Subscriber access the network?

SKILL.md contains no URLs. Its commands use pip, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Real-Time Stock Quote Subscriber safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Real-Time Stock Quote Subscriber use?

Real-Time Stock Quote Subscriber is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Real-Time Stock Quote Subscriber use?

About 559 tokens (SKILL.md is roughly 2.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 1.8k tokens, read only when the agent opens those files.

What are the alternatives to Real-Time Stock Quote Subscriber?

Skills that share tags, products or a category with Real-Time Stock Quote Subscriber: Web3 Polymarket (Polymarket/agent-skills, 191 stars), Cryptofeed (2025Emma/vibe-coding-cn, 23k stars), Tiger Brokers OpenAPI SDK (qusong0627/QuantMind, 1.7k stars) and Feeds (alsk1992/CloddsBot, 2.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Real-Time Stock Quote Subscriber?

Yourdaylight (a GitHub user) maintains it in Yourdaylight/stock_datasource, which has 189 GitHub stars. The repository holds 5 skills in this directory. The repository was last updated on September 8, 2026.

Source: Yourdaylight/stock_datasource on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.