← All skills
Tencent SkillHub Β· Developer Tools

Longbridge Openapi

Access Hong Kong, US, and A-share stock trading, real-time market data, order management, and account info via Longbridge Securities OpenAPI.

skill openclawclawhub Free
0 Downloads
0 Stars
0 Installs
0 Score
High Signal

Access Hong Kong, US, and A-share stock trading, real-time market data, order management, and account info via Longbridge Securities OpenAPI.

⬇ 0 downloads β˜… 0 stars Unverified but indexed

Install for OpenClaw

Quick setup
  1. Download the package from Yavira.
  2. Extract the archive and review SKILL.md first.
  3. Import or place the package into your OpenClaw setup.

Requirements

Target platform
OpenClaw
Install method
Manual import
Extraction
Extract archive
Prerequisites
OpenClaw
Primary doc
SKILL.md

Package facts

Download mode
Yavira redirect
Package format
ZIP package
Source platform
Tencent SkillHub
What's included
skill.py, README.md, SKILL.md, SKILL_ZH.md, skill.json, .claude/settings.local.json

Validation

  • Use the Yavira download entry.
  • Review SKILL.md after the package is downloaded.
  • Confirm the extracted package contains the expected setup assets.

Install with your agent

Agent handoff

Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.

  1. Download the package from Yavira.
  2. Extract it into a folder your agent can access.
  3. Paste one of the prompts below and point your agent at the extracted folder.
New install

I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.

Upgrade existing

I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.

Trust & source

Release facts

Source
Tencent SkillHub
Verification
Indexed source record
Version
1.0.1

Documentation

ClawHub primary doc Primary doc: SKILL.md 32 sections Open source page

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.

πŸ“Š 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)

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.

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%)

Market Data Tools

Tool NameDescriptionquote_subscribeSubscribe to real-time market feeds (quote/depth/broker/trade)get_realtime_quoteGet real-time stock quotesget_static_infoGet stock static informationget_candlesticksGet historical candlestick data

Trading Tools

Tool NameDescriptionsubmit_orderSubmit trading orderscancel_orderCancel ordersget_today_ordersGet today's order listget_history_ordersGet historical orders

Account Tools

Tool NameDescriptionget_account_balanceQuery account fund balanceget_stock_positionsQuery position list

Order Type Description

Type CodeOrder TypeDescriptionLOLimit OrderExecute at specified price or betterMOMarket OrderExecute immediately at current market priceELOEnhanced Limit OrderHong Kong stocks specific, can match at multiple price levelsALOAt-auction Limit OrderUse during auction period

Order Time in Force

CodeTime in ForceDescriptionDayDay OrderValid for the current trading dayGTCGood Till CancelledValid until filled or manually cancelledGTDGood Till DateValid until specified date

⚠️ Risk Warnings

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

πŸ”’ Security Recommendations

Protect Keys: Keep API keys secure, do not leak to others or commit to code repositories Test with Demo: Recommend testing with Longbridge demo account first Order Confirmation: All trading operations should be confirmed manually before execution Permission Control: Recommend setting minimum necessary permissions for API keys 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.

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.

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

πŸ“– Longbridge OpenAPI Official Documentation 🐍 Python SDK Documentation πŸ’» GitHub Source Repository πŸ“¦ PyPI Package 🌐 Open Platform Homepage

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.

Category context

Code helpers, APIs, CLIs, browser automation, testing, and developer operations.

Source: Tencent SkillHub

Largest current source with strong distribution and engagement signals.

Package contents

Included in package
3 Docs2 Config1 Scripts
  • SKILL.md Primary doc
  • README.md Docs
  • SKILL_ZH.md Docs
  • skill.py Scripts
  • .claude/settings.local.json Config
  • skill.json Config