Longbridge Stock Queries for Openclaw

A comprehensive financial skill for AI agents to query real-time stock quotes and manage portfolio data via Longbridge Securities.

weipapa
v1.0.0
Mar 11, 2026
0
927
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install longbridge-stock

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install longbridge-stock using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Longbridge Stock Queries?

The Longbridge Stock skill empowers AI coding agents to interface directly with the Longbridge Securities platform, providing high-fidelity financial data on demand. This skill enables real-time monitoring of stock prices across major markets, including the US, Hong Kong, and Mainland China.

By integrating this tool into your Openclaw Skills library, you can build smarter workflows that allow your agent to check market movements, verify account balances, and audit portfolio positions. It acts as a bridge between the developer's workspace and live financial markets, making it an essential asset for fintech-related automation.

Longbridge Stock Queries Use Cases

  • Fetching real-time stock quotes for US tickers like AAPL.US or TSLA.US.
  • Monitoring Hong Kong and Mainland China market prices (e.g., 700.HK or 600519.SH).
  • Checking account buying power and cash balance during financial planning sessions.
  • Retrieving current portfolio positions to evaluate investment performance.
  • Automating financial data collection for research and analysis reports.

How Longbridge Stock Queries Works

  1. The AI agent detects a user prompt related to stock prices or financial account status.
  2. The skill initializes by searching for valid API credentials in the .longbridge_config file located in environment variables or local directories.
  3. Depending on the request, the skill executes specific Python scripts (quote.py, balance.py, or positions.py) using the longport SDK.
  4. The skill communicates with the Longbridge OpenAPI to retrieve the requested market or account data.
  5. The retrieved data is parsed and presented back to the user or used in subsequent automated tasks.

Longbridge Stock Queries Setup

To get started, first install the necessary Python SDK:

pip3 install longport

Next, create a .longbridge_config file in your skill directory or home folder with your Longbridge OpenAPI credentials:

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

Longbridge Stock Queries Data Schema & Taxonomy

The skill organizes financial data through a structured symbol and configuration system:

Data Type Format Requirement Examples
US Stocks Ticker followed by .US AAPL.US, GOOGL.US
HK Stocks Number followed by .HK 700.HK, 9988.HK
China A-Shares Code followed by .SH or .SZ 600519.SH, 300750.SZ
Config Path Priority-based search Env Var > Local Dir > Home Dir

Longbridge Stock Queries Advanced Features

  • Multi-market support covering US, Hong Kong, Shanghai, and Shenzhen exchanges.
  • Robust configuration management with four-level priority search for .longbridge_config files.
  • High-performance data retrieval using the official Longbridge Python SDK for low-latency market updates.
  • Seamless extensibility within the Openclaw Skills ecosystem for multi-agent financial workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*