tencent-finance-stock-price
v1.1.0Query real-time stock market data using Tencent Finance API. Supports Chinese A-shares, Hong Kong stocks, and US stocks. No API key required.
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description say 'query Tencent Finance' and the bundled Python script implements exactly that: it maps names to codes, constructs a query to http://qt.gtimg.cn/q=<codes>, decodes GB encodings, and formats results. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs the agent to run the included script and documents input/output formats. The runtime instructions and script only perform HTTP GETs to qt.gtimg.cn and local parsing/printing. They do not read other system files, access unrelated environment variables, or transmit data to unexpected endpoints. (Minor implementation note: the script assumes sys.stdout.encoding is non-null and calls .lower(), which could raise in some constrained environments — this is a robustness bug, not a scope expansion.)
Install Mechanism
No install spec; skill is instruction-only with a single included Python script. Nothing is downloaded or written during install, so there is no high-risk install mechanism.
Credentials
The skill declares no required environment variables, no credentials, and no config paths. The script operates with network access only to the documented Tencent endpoint. Requested environment/credential access is proportional (none) to the stated purpose.
Persistence & Privilege
Defaults are used (not always:true). The skill is user-invocable and may be invoked autonomously by the agent (platform default), which is expected for a simple query skill. It does not modify other skills or system-wide settings.
Assessment
This skill appears coherent and implements exactly what it claims: it issues HTTP requests to qt.gtimg.cn and formats the returned stock data. Before installing, note: (1) the skill makes outbound network requests to qt.gtimg.cn — if you are in a restricted or sensitive environment, consider that these queries are visible to that remote host; (2) the source/homepage is unknown (code is included in the package so you can inspect it); (3) there's a minor robustness issue where stdout encoding handling may raise an error in some environments. If those points are acceptable, the skill is reasonable to use.Like a lobster shell, security has layers — review code before you run it.
latest
Tencent Finance Stock Price
Query real-time stock quotes via Tencent Finance API.
Usage
uv run ~/.openclaw/skills/tencent-finance-stock-price/scripts/query_stock.py <stock1> [stock2] ...
Supported Input Formats
Chinese Names (Auto-mapped)
- A-Share Indices:
上证指数,科创50,创业板指 - HK Indices:
恒生指数,恒生科技 - US Indices:
标普500,纳指100,纳斯达克
Stock Codes
- A-Shares:
sh000001,sz399006,sh600519(Moutai) - HK Stocks:
hkHSI,hk01810(Xiaomi) - US Stocks:
usAAPL(Apple),usTSLA(Tesla)
Examples
# Query by Chinese name
uv run ~/.openclaw/skills/tencent-finance-stock-price/scripts/query_stock.py 上证指数 恒生科技
# Query by code
uv run ~/.openclaw/skills/tencent-finance-stock-price/scripts/query_stock.py sh000001 hkHSI usAAPL
# Query multiple stocks
uv run ~/.openclaw/skills/tencent-finance-stock-price/scripts/query_stock.py 上证指数 创业板指 恒生指数 纳指100
Output Format
Returns a formatted table with:
- Name: Stock name
- Code: Stock code
- Price: Current price/points
- Change: Change amount
- Change%: Change percentage with 🟢/🔴 indicator
Data Source
- API:
http://qt.gtimg.cn/q=<codes> - Encoding: GB2312
- Response format:
v_code="data~data~..." - Key indices: 1=name, 3=price, 31=change, 32=change%
API Response Format
The Tencent API returns data in this format:
v_sh000001="1~上证指数~000001~4108.57~...~26.10~0.64~...";
Fields are separated by ~:
- Index 1: Stock name
- Index 3: Current price
- Index 31: Change amount
- Index 32: Change percentage
Comments
Loading comments...
