Loading...
Loading...
Subscribe to real-time stock market data via WebSocket (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. Requires a valid real-time subscription token purchased from the management platform.
npx skill4agent add yourdaylight/stock_datasource stock-rt-subscribe# Check if token exists
echo ${STOCK_RT_TOKEN:+Token is set}${STOCK_RT_TOKEN:-ERROR: STOCK_RT_TOKEN not set}
echo ${STOCK_RT_WS_URL:+WS URL is set}${STOCK_RT_WS_URL:-ERROR: STOCK_RT_WS_URL not set}export STOCK_RT_TOKEN="eyJ..."
export STOCK_RT_WS_URL="wss://your-node:8443/ws/stock"| Plan | Symbols | Markets | Price |
|---|---|---|---|
| Pack 5 (Entry) | 5 | A-shares + HK | 10 CNY/month |
| Pack 15 (Standard) | 15 | A-shares + HK | 20 CNY/month |
| Pack 50 (Pro) | 50 | A-shares + HK | 50 CNY/month |
WebSocket URL: ${STOCK_RT_WS_URL}
Authorization: Bearer ${STOCK_RT_TOKEN}{
"action": "subscribe",
"symbols": ["000001.SZ", "600519.SH", "00700.HK"]
}{
"action": "unsubscribe",
"symbols": ["000001.SZ"]
}{
"type": "kline",
"symbol": "000001.SZ",
"data": {
"open": 10.50,
"high": 10.55,
"low": 10.48,
"close": 10.52,
"volume": 123456,
"amount": 1298765.00,
"timestamp": "2026-03-08T14:30:01.500Z"
}
}["CN", "HK"]["L1"]