longport-mcp
Using the Longport MCP server to perform stock trading, market quotes, and portfolio management via Longport Securities API.
Why use this skill?
Integrate Longport Securities into OpenClaw. Execute trades, monitor portfolios, and fetch real-time market data with this secure financial agent skill.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hakureirm/longport-mcpWhat This Skill Does
The longport-mcp skill acts as a bridge between the OpenClaw agent and the Longport Securities API, enabling seamless interaction with global financial markets. By integrating this skill, your AI agent gains the capability to query real-time market data, execute trading orders, track portfolio performance, and analyze historical price trends. It transforms your agent into an intelligent financial assistant, capable of monitoring your holdings and responding to market shifts without requiring you to manually navigate trading platforms. The skill leverages the Model Context Protocol (MCP) to ensure secure, standardized communication between the agent and your brokerage account.
Installation
To integrate this skill into your environment, use the ClawHub CLI tool. Ensure you have your Longport API credentials ready as the skill will require these to authenticate with the brokerage servers. Execute the following command in your terminal:
clawhub install openclaw/skills/skills/hakureirm/longport-mcp
After installation, follow the agent's prompts to input your API key and secret. It is highly recommended to store these in an environment variable file or a secure vault managed by OpenClaw to maintain strict security practices.
Use Cases
- Portfolio Monitoring: Automatically receive summaries of your account performance, including daily gains and losses.
- Trade Execution: Authorize the agent to place limit or market orders based on specific entry/exit criteria.
- Market Research: Ask the agent to pull the latest stock quotes, order book depth, or historical charts for technical analysis.
- Alert Automation: Configure the agent to notify you when a specific stock hits a target price or experiences high volatility.
Example Prompts
- "What is the current market sentiment and price for AAPL? Show me the order book depth for the next 5 levels."
- "Place a limit order to buy 10 shares of NVDA at a price of $120.00, valid for the current trading day."
- "Summarize my current portfolio performance and tell me which asset has the highest percentage gain today."
Tips & Limitations
- Security: Never share your API credentials in plaintext prompts. Ensure your agent is configured to verify trade executions with a secondary confirmation step.
- Market Hours: Note that trading orders can only be executed during active market hours for the specific exchange; the agent may reject orders placed during pre-market or after-hours unless specified.
- Rate Limits: The Longport API enforces strict rate limits on data requests. Do not spam the agent with rapid-fire quote requests to avoid temporary IP blocking.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hakureirm-longport-mcp": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, external-api