Token导航 LogoToken导航

Agent Skill · 研究检索

longbridge-openapi(长桥 openapi)

用于辅助 API 设计、接口文档、请求响应结构和服务集成说明。它适合让 Agent 梳理 endpoint、生成 OpenAPI 草稿、检查字段命名、整理错误码或辅助前后端联调。使用时需要确认真实业务语义、鉴权方式、分页和错误处理规则;涉及生成接口文档时,应避免凭空补字段,最好从现有代码、schema 或接口样例中提取事实。

longbridge-openapi 是研究检索类 Agent Skill,可用宿主为 OpenClaw,通过ClawHub获取,权限为接触敏感数据;许可证为 MIT-0,第三方扫描有提醒项,按安装量在研究检索类的 73,675 个 Skill 里排第 2,263。

总安装 64,596周安装 2,588GitHub Stars 4下载 20,911核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
MIT-0
版本
1.0.1

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:longbridge-openapi(长桥 openapi)
来源仓库:https://github.com/genkin-he/longbridge-openapi
安装命令:
openclaw skills install longbridge-openapi
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install longbridge-openapi

这个 Skill 是做什么的

研究检索类 Skill 主要解决「找资料、核对事实、把来源整理清楚」的问题,通常会让助手先检索再总结。

通过长桥证券OpenAPI访问香港、美国和A股股票交易、实时市场数据、订单管理和账户信息。

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 OpenClaw;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 openclaw skills install longbridge-openapi;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

longbridge-openapi 怎么安装?

在终端执行 openclaw skills install longbridge-openapi。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

longbridge-openapi 支持哪些 AI 工具?

公开资料标注支持 OpenClaw。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

longbridge-openapi 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

longbridge-openapi 是免费的吗?

来源标注的许可证是 MIT-0。本站不代收任何费用,也不托管安装包;能否商用、要不要署名,以许可证原文为准。

longbridge-openapi 用的人多吗?

公开数据是累计安装 64,596 次,近一周安装 2,588 次,下载 20,911 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

longbridge-openapi 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 专注 OpenClaw 一种宿主,触发方式和使用习惯不用来回切换。
  • 许可证明确为 MIT-0,商用和分发边界好判断。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 OpenClaw,想直接扩展它能力的人。
  • 需要处理研究检索类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要厂商级技术支持和 SLA 的生产系统。

研究检索类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
find-skills

寻找技能 · Codex、Claude

31,199,81316,486操作浏览器MIT有提醒
self-improving-agent

自我改进 Agent · OpenClaw

16,464,0023,396接触敏感数据MIT-0通过
soultrace

灵魂追踪 · Codex、Claude

7,588,94412需要联网未明确有提醒
self-improving

自我完善 · OpenClaw

6,829,2841,046需要联网MIT-0通过
microsoft-foundry

微软代工厂 · Codex、Claude

6,614,144764调用外部服务未明确有提醒
longbridge-openapi

长桥 openapi · 本页

64,5964接触敏感数据MIT-0有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Longbridge OpenAPI

Longbridge Securities OpenAPI SDK, supporting Hong Kong and US stock trading, real-time market data subscription, and account management.

Introduction

Longbridge OpenAPI Skill is an AI skill package integrated with Longbridge Securities Open API, allowing you to interact with OpenClaw using natural language to easily complete stock market queries, trade orders, account management, and other operations.

Core Features

📊 Market Data

  • Real-time Market Subscription: Subscribe to real-time market feeds for Hong Kong stocks, US stocks, and A-shares
  • Stock Quote Query: Get real-time data such as latest price, volume, price change, etc.
  • Candlestick Data: Support multiple periods including minute, day, week, month, and year
  • Static Information: Query basic information such as stock name, exchange, currency, lot size, etc.

💰 Trading Features

  • Smart Order Placement: Support various order types including limit order, market order, enhanced limit order, etc.
  • Order Management: Cancel orders, modify orders
  • Order Query: View today's orders, historical orders, and trade records
  • Multi-market Support: Coverage of Hong Kong stocks, US stocks, and A-shares

💼 Account Management

  • Fund Query: View account balance, buying power, and net assets in real-time
  • Position Management: Query current positions, cost price, market value, and other information
  • Multi-currency Support: Support multiple currencies including HKD, USD, CNY, etc.

Supported Markets

MarketCode FormatExamples
🇭🇰 Hong KongXXX.HK700.HK (Tencent), 9988.HK (Alibaba)
🇺🇸 US StocksXXX.USAAPL.US (Apple), TSLA.US (Tesla)
🇨🇳 A-SharesXXX.SH/SZ000001.SZ (Ping An Bank), 600519.SH (Moutai)

Configuration Guide

1. Obtain API Credentials

Visit Longbridge Open Platform to register an account and create an application to obtain:

  • App Key: Application key
  • App Secret: Application secret
  • Access Token: Access token

2. Configure Environment Variables

Before using this skill, you must set the following environment variables:

export LONGBRIDGE_APP_KEY="your_app_key_here"
export LONGBRIDGE_APP_SECRET="your_app_secret_here"
export LONGBRIDGE_ACCESS_TOKEN="your_access_token_here"

Persistent Configuration (Recommended):

Add to ~/.bashrc or ~/.zshrc:

# Longbridge OpenAPI Configuration
export LONGBRIDGE_APP_KEY="your_app_key_here"
export LONGBRIDGE_APP_SECRET="your_app_secret_here"
export LONGBRIDGE_ACCESS_TOKEN="your_access_token_here"

Then execute source ~/.bashrc or source ~/.zshrc to apply the configuration.

Usage Examples

Example 1: Query Stock Market Data

User Input:

Query the latest stock prices of Tencent and Alibaba

OpenClaw Operation:

  • Call get_realtime_quote tool
  • Parameters: symbols=['700.HK', '9988.HK']

Response:

Tencent Holdings (700.HK)
Latest: 320.40 HKD | Change: +2.40 (+0.75%)
Open: 318.00 | High: 322.80 | Low: 317.60
Volume: 1,234,567 shares | Turnover: 395M HKD

Alibaba-SW (9988.HK)
Latest: 78.50 HKD | Change: -1.20 (-1.51%)
Open: 79.20 | High: 80.00 | Low: 78.00
Volume: 2,345,678 shares | Turnover: 184M HKD

Example 2: Get Candlestick Data

User Input:

Get the last 7 days of daily candlestick data for Apple stock

OpenClaw Operation:

  • Call get_candlesticks tool
  • Parameters: symbol='AAPL.US', period='day', count=7

Response: Contains 7 candlesticks with data including open, high, low, close, volume, etc.

Example 3: Submit Buy Order

User Input:

Buy 100 shares of Tencent at 320 HKD

OpenClaw Operation:

  • First confirm order details with user
  • Call submit_order tool
  • Parameters:
  symbol='700.HK'
  order_type='LO'  # Limit order
  side='Buy'
  quantity=100
  price=320.0
  time_in_force='Day'

Response:

✅ Order submitted successfully
Order ID: 123456789
Stock: Tencent Holdings (700.HK)
Side: Buy
Quantity: 100 shares
Price: 320.00 HKD
Type: Limit Order (Day)

Example 4: Query Account Information

User Input:

What is my account balance?

OpenClaw Operation:

  • Call get_account_balance tool

Response:

💰 Account Fund Status

HKD Account
Cash: 50,000.00 HKD
Buying Power: 100,000.00 HKD
Net Assets: 150,000.00 HKD

USD Account
Cash: 10,000.00 USD
Buying Power: 20,000.00 USD
Net Assets: 30,000.00 USD

Example 5: View Positions

User Input:

What stocks do I hold?

OpenClaw Operation:

  • Call get_stock_positions tool

Response:

📊 Current Positions

1. Tencent Holdings (700.HK)
   Quantity: 500 shares | Available: 500 shares
   Cost: 300.00 HKD | Current: 320.40 HKD
   Market Value: 160,200.00 HKD | P&L: +10,200.00 (+6.80%)

2. Apple (AAPL.US)
   Quantity: 100 shares | Available: 100 shares
   Cost: 150.00 USD | Current: 175.50 USD
   Market Value: 17,550.00 USD | P&L: +2,550.00 (+17.00%)

API Tool List

Market Data Tools

Tool NameDescription
quote_subscribeSubscribe to real-time market feeds (quote/depth/broker/trade)
get_realtime_quoteGet real-time stock quotes
get_static_infoGet stock static information
get_candlesticksGet historical candlestick data

Trading Tools

Tool NameDescription
submit_orderSubmit trading orders
cancel_orderCancel orders
get_today_ordersGet today's order list
get_history_ordersGet historical orders

Account Tools

Tool NameDescription
get_account_balanceQuery account fund balance
get_stock_positionsQuery position list

Order Type Description

Type CodeOrder TypeDescription
LOLimit OrderExecute at specified price or better
MOMarket OrderExecute immediately at current market price
ELOEnhanced Limit OrderHong Kong stocks specific, can match at multiple price levels
ALOAt-auction Limit OrderUse during auction period

Order Time in Force

CodeTime in ForceDescription
DayDay OrderValid for the current trading day
GTCGood Till CancelledValid until filled or manually cancelled
GTDGood Till DateValid until specified date

Security Precautions

⚠️ Risk Warnings

  1. Investment Risks: Stock trading involves market risks, users are responsible for their own investment decisions
  2. For Learning Only: This skill is for technical learning and research only, does not constitute investment advice
  3. Use with Caution: Do not use directly in production environment without thorough testing

🔒 Security Recommendations

  1. Protect Keys: Keep API keys secure, do not leak to others or commit to code repositories
  2. Test with Demo: Recommend testing with Longbridge demo account first
  3. Order Confirmation: All trading operations should be confirmed manually before execution
  4. Permission Control: Recommend setting minimum necessary permissions for API keys
  5. Regular Rotation: Regularly rotate API keys to improve security

Technical Architecture

┌──────────────────┐
│    OpenClaw      │  ← User natural language interaction
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ Longbridge Skill │  ← Skill layer (tool invocation)
│   (skill.py)     │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ Longbridge SDK   │  ← Python SDK (FFI)
│   (longbridge)   │
└────────┬─────────┘
         │
         ▼
┌──────────────────┐
│ Longbridge API   │  ← REST API / WebSocket
│ (HTTP/WebSocket) │
└──────────────────┘

Dependencies

  • Python: >= 3.7
  • longbridge: >= 0.2.77

Dependencies will be installed automatically when installing the skill.

Frequently Asked Questions

Q1: How to obtain API keys?

Visit Longbridge Open Platform, register an account, then create an application in "Application Management" to obtain the keys.

Q2: Does it support demo account?

Yes, Longbridge provides demo accounts for testing. You can switch to the simulation environment on the open platform.

Q3: What to do if order submission fails?

Please check:

  • Are environment variables configured correctly?
  • Are API keys valid?
  • Is account balance sufficient?
  • Is trading time within market hours?
  • Are order parameters valid (price, quantity, etc.)?

Q4: Which markets are supported?

Currently supports stocks, ETFs, warrants, and options trading in Hong Kong, US, and A-share markets.

Q5: How to view API call logs?

The SDK outputs logs internally. You can configure Python's logging module to view detailed call information.

Changelog

v1.0.0 (2026-02-02)

  • ✨ Initial release
  • ✅ Support real-time market query and subscription
  • ✅ Support order submission, cancellation, and modification
  • ✅ Support account fund and position queries
  • ✅ Support historical candlestick data retrieval
  • ✅ Full coverage of Hong Kong, US, and A-share markets

References

License

MIT License

Author

genkin

Support

If you have questions or suggestions, please contact us through:

  • Submit issues to GitHub
  • Visit Longbridge developer community
  • Refer to official documentation

Disclaimer: This skill is for learning and technical research only and does not constitute investment advice. Users should fully understand the risks of stock investment and be responsible for their own investment decisions.

平台分布

OpenClaw

84.93%
按下载量换算17,760

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

未展示

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills