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 stock prices, market data, checking portfolio value, or asking about specific stocks like Apple, Tencent, or Tesla—even if they don't name Longbridge explicitly. Supports AAPL.US, 700.HK, 600519.SH formats.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "longbridge-stock" with this command: npx skills add weipapa/longbridge-stock

Longbridge Stock Queries

Prerequisites

pip3 install longport

Scripts

Run from the skill directory:

ScriptUsageDescription
quote.pypython3 scripts/quote.py AAPL.US GOOGL.USReal-time stock quotes
balance.pypython3 scripts/balance.pyAccount balance and buying power
positions.pypython3 scripts/positions.pyPortfolio positions

Stock Symbol Format

MarketFormatExamples
US<TICKER>.USAAPL.US, GOOGL.US, TSLA.US
Hong Kong<NUMBER>.HK700.HK (腾讯), 9988.HK (阿里)
Shanghai A-share<CODE>.SH600519.SH (茅台)
Shenzhen A-share<CODE>.SZ300750.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. <skill-dir>/.longbridge_config
  3. <skill-dir>../../../.longbridge_config (workspace root)
  4. ~/.longbridge_config or ~/.config/longbridge/.longbridge_config

Config file format:

LONGPORT_APP_KEY=<your_app_key>
LONGPORT_APP_SECRET=<your_app_secret>
LONGPORT_ACCESS_TOKEN=<your_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

ErrorSolution
配置文件不存在Create .longbridge_config
配置文件缺少: LONGPORT_ACCESS_TOKENAdd all required fields to config
ModuleNotFoundError: No module named 'longport'Run pip3 install longport
You do not have access to market's Open API dataCheck Longbridge subscription

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Session-Memory Enhanced

Session-Memory Enhanced v4.0 - 统一增强版。融合 session-memory + memu-engine 核心功能。特性:结构化提取 + 向量检索 + 不可变分片 + 三位一体自动化 + 多代理隔离 + AI 摘要 + 零配置启动。

Registry SourceRecently Updated
General

PRISM-GEN-DEMO

English: Retrieve, filter, sort, merge, and visualize multiple CSV result files from PRISM-Gen molecular generation/screening. Provides portable query-based...

Registry SourceRecently Updated
General

Video Pro by cza999

专业AI视频生成器,支持文本转高质量短视频,批量处理、多模板和高级自定义语音功能,适合创作者和企业。

Registry SourceRecently Updated
0133
cza999