← 返回
效率工具 Key

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...
Real-time stock quotes and account queries for Longbridge (长桥证券) users. Query US/HK/China stocks, account balance, and positions. Use whenever user mentions...
weipapa
效率工具 clawhub v1.0.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 639
下载
💾 43
安装
1
版本
#latest

概述

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.USAAPL.US, GOOGL.US, TSLA.US
Hong Kong.HK700.HK (腾讯), 9988.HK (阿里)
Shanghai A-share.SH600519.SH (茅台)
Shenzhen A-share.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. /.longbridge_config
  3. ../../../.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

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-31 00:29 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,663
productivity

Obsidian

steipete
操作 Obsidian 仓库(纯 Markdown 笔记)并通过 obsidian-cli 自动化。
★ 432 📥 103,787
productivity

Nano Pdf

steipete
使用nano-pdf CLI通过自然语言指令编辑PDF
★ 275 📥 114,846