← Back to Skills Marketplace
p3dp

LongbridgeAssistant

by JaysonDing · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
93
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install longbridge-assistant
Description
长桥证券智能投资助手。自动监控持仓、生成投资组合可视化图表、智能止盈止损提醒。Use when: user asks about 长桥持仓、投资组合分析、止盈止损、股票监控、portfolio analysis、price alerts. Features: 实时获取49+只股票持仓、港股/美股分开可视化、价格触...
README (SKILL.md)

长桥智能投资助手

自动监控长桥证券持仓,提供智能止盈止损提醒、投资组合分析和可视化图表。

When to Use

USE this skill when:

  • "查看我的长桥持仓"
  • "投资组合分析"
  • "止盈止损提醒"
  • "生成持仓图表"
  • "监控股票价格"
  • "portfolio analysis"
  • "price alerts"

When NOT to Use

DON'T use this skill when:

  • 其他券商账户(如富途、老虎)
  • 实时交易执行(仅监控提醒)
  • 技术分析指标(K线、MACD等)
  • 历史交易记录查询

Commands

查看持仓

cd ~/.qclaw/workspace/skills/longbridge-assistant
./run.sh

配置 API

./setup.sh

自定义监控

编辑 longbridge_skill.py 中的 ALERTS 字典:

ALERTS = {
    'AAPL.US': [
        {'price': 150.0, 'action': 'buy_more', 'msg': '苹果回调至$150,建议加仓'},
        {'price': 200.0, 'action': 'sell_partial', 'msg': '苹果涨至$200,建议减仓'},
    ],
}

Example Output

🦞 长桥智能投资助手 v2.0.0

📊 获取持仓及市值信息...
✅ 获取成功,共 49 只持仓
💰 总市值: $1,769,599

📈 生成投资组合图表...
   ✅ 图表已保存: portfolio_chart.png

📋 前10大持仓:
 1. 🟢 小米(1810.HK)     10700股 @ $33.20 = $355,240
 2. 🟢 7226.HK           60000股 @ $3.86  = $231,600
 ...

🔔 价格提醒检查:
   ⚠️  SMCI 当前 $22.15,低于目标 $35

📊 组合分析:
   总持仓: 49 只
   做多: 41 只 ($1,715,764)
   做空: 8 只 ($53,835)
   净值: $1,661,929

   💡 建议: 持仓过于分散,建议集中优质标的

Setup

1. 安装依赖

pip install longbridge matplotlib

2. 配置 API Token

创建文件 ~/.longbridge/env

export LONGBRIDGE_APP_KEY="你的AppKey"
export LONGBRIDGE_APP_SECRET="你的AppSecret"
export LONGBRIDGE_ACCESS_TOKEN="你的AccessToken"

获取方式:https://open.longportapp.com

3. 运行

./run.sh

Features

功能 说明
持仓监控 自动获取49+只股票
可视化 港股/美股分开饼图
止盈止损 价格触发提醒
投资建议 持仓分析建议

Notes

  • 需要长桥 OpenAPI 权限
  • API 有调用频率限制
  • 仅供参考,不构成投资建议

Version

v2.0.0 (2026-03-23)

Usage Guidance
This skill is functionally coherent: it uses the Longbridge SDK to read holdings and generate charts and only needs three Longbridge credentials. Still, proceed cautiously: 1) Inspect ~/.longbridge/env before using—only store the three Longbridge tokens there and avoid adding other secrets. 2) Prefer tokens with read-only or minimal permissions if Longbridge supports scopes. 3) The monetization documentation explicitly mentions selling anonymized user data—that is not present in the code today but suggests the author may plan to collect/monetize usage data; only install if you trust the author or after confirming how user data will be handled. 4) Run the skill in an isolated environment/virtualenv and review run.sh/setup.sh to ensure they match your environment (run.sh assumes ~/.venv/longbridge). 5) If you need stronger assurance, ask the publisher for a canonical source repo (the manifest's repository URL is a placeholder) and a privacy/data-use statement, or inspect runtime network traffic to confirm no unexpected external endpoints are contacted.
Capability Analysis
Type: OpenClaw Skill Name: longbridge-assistant Version: 1.0.0 The longbridge-assistant skill is a legitimate investment tool designed to monitor stock positions and generate portfolio visualizations using the Longbridge Securities OpenAPI. It handles sensitive API credentials (APP_KEY, APP_SECRET, ACCESS_TOKEN) by reading them from a local environment file (~/.longbridge/env), which is standard practice for such integrations. The Python code (longbridge_skill.py) and shell scripts (setup.sh, run.sh) perform expected tasks like installing dependencies via pip, fetching market data, and saving charts locally without any evidence of data exfiltration, obfuscation, or malicious intent.
Capability Assessment
Purpose & Capability
Name/description require Longbridge API access and the files/scripts require the longbridge Python SDK and matplotlib. The required env vars (LONGBRIDGE_APP_KEY, LONGBRIDGE_APP_SECRET, LONGBRIDGE_ACCESS_TOKEN) and python3 binary are consistent with the stated purpose.
Instruction Scope
Runtime instructions and scripts instruct the agent to read and source ~/.longbridge/env and to run ./run.sh which exports all variables found in that file. The Python script also reads ~/.longbridge/env itself. This is expected for an API-token-based tool, but it means any variables present in that file (not only the three declared tokens) will be loaded into the process. The SKILL.md does not instruct any unrelated system access, file exfiltration, or external endpoints beyond the Longbridge homepage.
Install Mechanism
No network download/install from untrusted URLs. setup.sh installs Python packages via pip (longbridge, matplotlib) which is proportionate. There is no extract-from-arbitrary-URL or remote binary install.
Credentials
Declared env vars are appropriate for the Longbridge integration. However: (1) the skill loads ~/.longbridge/env wholesale and run.sh does export $(grep -v '^#' ~/.longbridge/env | xargs), so any additional secrets placed there would be picked up; (2) monetization.md explicitly lists '匿名化用户数据卖给机构' (selling anonymized user data) as a monetization strategy — this is not implemented in code but signals a potential future data-sharing practice. Users should treat tokens as sensitive and prefer read-only or limited-scope credentials if available.
Persistence & Privilege
The skill is not always:true, does not request system-wide config changes, and does not modify other skills. It runs as a user script and relies on a user-provided env file and (optional) virtualenv; no privileged persistence is requested.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install longbridge-assistant
  3. After installation, invoke the skill by name or use /longbridge-assistant
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
- Initial release of 长桥证券智能投资助手. - 自动监控长桥证券持仓,支持49+只股票。 - 提供港股/美股分开持仓可视化图表。 - 支持自定义价格触发提醒,实现智能止盈止损。 - 生成投资组合分析报告及投资建议。 - 需配置长桥开放平台 API key、secret 与 token。
Metadata
Slug longbridge-assistant
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is LongbridgeAssistant?

长桥证券智能投资助手。自动监控持仓、生成投资组合可视化图表、智能止盈止损提醒。Use when: user asks about 长桥持仓、投资组合分析、止盈止损、股票监控、portfolio analysis、price alerts. Features: 实时获取49+只股票持仓、港股/美股分开可视化、价格触... It is an AI Agent Skill for Claude Code / OpenClaw, with 93 downloads so far.

How do I install LongbridgeAssistant?

Run "/install longbridge-assistant" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is LongbridgeAssistant free?

Yes, LongbridgeAssistant is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does LongbridgeAssistant support?

LongbridgeAssistant is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created LongbridgeAssistant?

It is built and maintained by JaysonDing (@p3dp); the current version is v1.0.0.

💬 Comments