← 返回 Skills 市场
weipapa

longbridge-stock

作者 weipapa · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
359
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install longbridge-stock
功能描述
Real-time stock quotes and account queries for Longbridge (长桥证券) users. Query US/HK/China stocks, account balance, and positions. Use whenever user mentions...
使用说明 (SKILL.md)

Longbridge Stock Queries

Prerequisites

pip3 install longport

Scripts

Run from the skill directory:

Script Usage Description
quote.py python3 scripts/quote.py AAPL.US GOOGL.US Real-time stock quotes
balance.py python3 scripts/balance.py Account balance and buying power
positions.py python3 scripts/positions.py Portfolio positions

Stock Symbol Format

Market Format Examples
US \x3CTICKER>.US AAPL.US, GOOGL.US, TSLA.US
Hong Kong \x3CNUMBER>.HK 700.HK (腾讯), 9988.HK (阿里)
Shanghai A-share \x3CCODE>.SH 600519.SH (茅台)
Shenzhen A-share \x3CCODE>.SZ 300750.SZ (宁德时代)

See symbols.md for common stock codes.

Configuration

Create .longbridge_config in one of these locations (priority order):

  1. Environment variable: LONGBRIDGE_CONFIG=/path/to/.longbridge_config
  2. \x3Cskill-dir>/.longbridge_config
  3. \x3Cskill-dir>../../../.longbridge_config (workspace root)
  4. ~/.longbridge_config or ~/.config/longbridge/.longbridge_config

Config file format:

LONGPORT_APP_KEY=\x3Cyour_app_key>
LONGPORT_APP_SECRET=\x3Cyour_app_secret>
LONGPORT_ACCESS_TOKEN=\x3Cyour_access_token>
LONGPORT_REGION=cn
LONGPORT_HTTP_URL=https://openapi.longportapp.cn
LONGPORT_QUOTE_WS_URL=wss://openapi-quote.longportapp.cn
LONGPORT_TRADE_WS_URL=wss://openapi-trade.longportapp.cn

Get credentials from https://open.longport.com/

For detailed setup, see config.md.

Troubleshooting

Error Solution
配置文件不存在 Create .longbridge_config
配置文件缺少: LONGPORT_ACCESS_TOKEN Add all required fields to config
ModuleNotFoundError: No module named 'longport' Run pip3 install longport
You do not have access to market's Open API data Check Longbridge subscription
安全使用建议
This skill appears to implement the Longbridge functionality it claims, but it requires your Longport API credentials via a .longbridge_config file (or LONGBRIDGE_CONFIG env var) even though the skill metadata doesn't declare those sensitive requirements. Before installing or using it: - Do not place your real credentials in a workspace-shared or repository-root config file. The scripts search parent directories (including ../../../ and config/secrets paths) and could pick up unrelated secrets—store credentials in a dedicated private path and set LONGBRIDGE_CONFIG to that path. - Verify the Python package to be installed (pip3 install longport) comes from a trusted source (PyPI) and inspect the longport package if you can. - Consider running the scripts locally with a test account or read-only token first, and inspect logs/output. - Ask the publisher to update the skill manifest to declare the required credentials (or a primaryEnv) and to narrow the config lookup to only the skill directory or an explicit env var to avoid reading workspace secrets. If you cannot confirm these points, treat the skill as untrusted for accounts containing real funds or sensitive credentials.
功能分析
Type: OpenClaw Skill Name: longbridge-stock Version: 1.0.0 The skill bundle provides legitimate tools for querying stock market data and account information via the official Longbridge (长桥证券) OpenAPI. The Python scripts (quote.py, balance.py, positions.py) use the official 'longport' SDK and follow standard practices for configuration management, searching for credentials in a dedicated '.longbridge_config' file. There is no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
The name/description (Longbridge real-time quotes and account queries) matches the included scripts which call the Longbridge/Longport SDK. However the skill metadata declares no required credentials or env vars, while the runtime requires Longport API credentials—this is an internal inconsistency (missing declared requirements).
Instruction Scope
SKILL.md tells the agent to run the provided scripts and to create a .longbridge_config containing LONGPORT_APP_KEY/SECRET/ACCESS_TOKEN. The scripts read that config and call Longport endpoints—functionally appropriate—but the config discovery logic searches up multiple parent/workspace paths (e.g., ../../../.longbridge_config and ../../../config/secrets/.longbridge_config). That broad search increases the chance the skill will read unrelated secrets from the workspace/root, which is scope creep relative to a simple skill.
Install Mechanism
No install spec (instruction-only) and instructions tell the user to pip3 install longport. There are no downloads from untrusted URLs or extract/install steps. This is low-risk for install mechanism.
Credentials
The skill requires Longport credentials (LONGPORT_APP_KEY, LONGPORT_APP_SECRET, LONGPORT_ACCESS_TOKEN) but the metadata lists no required env vars or primary credential. Credentials are expected in a config file or via LONGBRIDGE_CONFIG env var, but this is not declared in the skill manifest—lack of declared sensitive requirements is a mismatch and should be fixed before trusting the skill.
Persistence & Privilege
always is false and the skill is user-invocable; it does not request persistent system-wide privileges or modify other skills. Autonomous invocation is allowed by default but is not combined with other high-risk flags here.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install longbridge-stock
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /longbridge-stock 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release of Longbridge stock quote and account skill. - Supports real-time stock quotes for US, Hong Kong, and China A-share markets. - Allows Longbridge users to check account balance and portfolio positions. - Recognizes user requests for market data, portfolio value, or specific stocks (like Apple, Tencent, or Tesla). - Uses standard stock code formats (e.g., AAPL.US, 700.HK, 600519.SH). - Easy setup with a config file and `longport` Python package. - Includes troubleshooting steps for common setup and usage errors.
元数据
Slug longbridge-stock
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

longbridge-stock 是什么?

Real-time stock quotes and account queries for Longbridge (长桥证券) users. Query US/HK/China stocks, account balance, and positions. Use whenever user mentions... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 359 次。

如何安装 longbridge-stock?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install longbridge-stock」即可一键安装,无需额外配置。

longbridge-stock 是免费的吗?

是的,longbridge-stock 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

longbridge-stock 支持哪些平台?

longbridge-stock 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 longbridge-stock?

由 weipapa(@weipapa)开发并维护,当前版本 v1.0.0。

💬 留言讨论