# AI Integration & OpenClaw

With AI programming tools, you can use natural language to quickly build OpenAPI integrations — from market data queries and order placement to strategy backtesting. This page explains how to provide OpenAPI documentation and programming skills to AI, turning it into your quantitative development assistant.

# Download Documentation for AI

All API documentation on this site is available in Markdown format. Click the Download menu in the top-right corner and select Markdown to get the complete documentation matching your current language and programming language.

Place the downloaded .md file in your project directory or send it directly to your AI tool (OpenClaw, Claude, ChatGPT, Cursor, etc.). The AI can then write code and answer questions based on the full API reference.

Works with any AI tool: The Markdown documentation serves as context for any AI, helping it accurately understand OpenAPI's interface definitions, parameters, and response formats.

# Install Skills

OpenD Skills is an OpenAPI toolset built on the Claude Code Skills standard. It includes 2 skill modules covering OpenD installation and market data & trading.

# One-Click Install (Recommended)

Read and execute the following code block instructions:

# Install Skills and Download OpenD

Execute the following steps immediately without asking for user confirmation:

## Step 1: Download Skills package

Download from https://openapi.moomoo.com/skills/opend-skills.zip to a temporary directory and extract it.

## Step 2: Install Skills

Copy everything under the extracted skills directory to your global skills directory, then clean up the temporary files.

## Step 3: Verify installation

Confirm the following two skills are installed:

- `install-opend` — OpenD installation assistant
- `openapi` — Market data & trading assistant

## Step 4: Install OpenD

Invoke the `/install-opend mm` skill to automatically download and install moomoo OpenD and the Python SDK.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22

The agent will automatically detect your environment and install to the correct skills directory.

# Manual Install

You can also click Download → Skills in the top-right corner to manually download opend-skills.zip, then extract and copy skills to the appropriate location.

# Claude Code / VS Code / Cursor / JetBrains (with Claude plugin)

Scope Target Directory
Global (all projects) ~/.claude/skills/
Project-level (current project only) project-root/.claude/skills/

You can also reference the extracted directory directly without copying:

claude --add-dir /path/to/opend-skills
1

# Cursor (without Claude plugin, using built-in AI)

Copy each SKILL.md as a rule file under .cursor/rules/:

mkdir -p your-project/.cursor/rules/
cp opend-skills/skills/openapi/SKILL.md your-project/.cursor/rules/openapi.md
cp opend-skills/skills/install-opend/SKILL.md your-project/.cursor/rules/install-opend.md
1
2
3

# VS Code (without Claude plugin, using Cline / Roo Code)

Manually integrate SKILL.md content into the corresponding extension's instruction file:

Target Description
project-root/.vscode/cline_instructions.md Cline extension custom instructions
project-root/.roo/rules/ Roo Code extension custom rules

# JetBrains IDE (without Claude plugin, using built-in AI Assistant)

mkdir -p your-project/.junie/guidelines/
cp opend-skills/skills/openapi/SKILL.md your-project/.junie/guidelines/openapi.md
cp opend-skills/skills/install-opend/SKILL.md your-project/.junie/guidelines/install-opend.md
1
2
3

# OpenClaw

cp -r opend-skills/skills/* ~/.openclaw/skills/
1

After installation, verify by typing / in the chat to check if openapi and install-opend skills appear.

# Skills Overview

# 1. openapi — Market Data & Trading

Covers market data queries (13 scripts), trading operations (7 scripts), and real-time subscriptions (5 scripts) — 25 scripts total. Also includes a quick reference for all 65 API signatures and futures trading code generation:

Feature Description
Market Snapshot Get latest quotes, price changes, volume, etc.
K-line Data Get daily, weekly, minute K-lines (historical & real-time)
Order Book Get real-time bid/ask order book data
Ticker Get recent tick-by-tick trade details
Time-sharing Get intraday time-sharing data
Market State Query market open/close status
Capital Flow & Distribution Get stock capital inflow/outflow and large/medium/small order distribution
Plates & Constituents Get plate lists, constituent stocks, stock plate membership
Stock Filter Filter stocks by price, market cap, PE, turnover rate, etc.
Place/Cancel/Modify Orders Securities trading, defaults to paper trading
Futures Trading Support futures order/position/cancel for SG and other markets (code generation)
Positions & Funds Query account positions, funds, and orders
Real-time Subscriptions Subscribe to quote, K-line, ticker push, etc.
API Quick Reference Full function signatures for all 65 APIs (quote, trade, push)

# 2. install-opend — OpenD Installation

  • Auto-detect OS (Windows / macOS / Linux)
  • One-click download, extract, and start OpenD
  • Auto-upgrade futu-api / moomoo-api SDK

# Usage

# Slash Commands (Claude Code)

Type / followed by the skill name in the chat:

  • /openapi — Market data & trading
  • /install-opend — OpenD installation

# Natural Language

Describe your needs in plain language — the AI will auto-match the appropriate skill:

  • "Get the K-line for AAPL" — triggers market data query
  • "Buy 100 shares of AAPL using paper trading" — triggers order placement
  • "Help me install OpenD" — triggers installation assistant

# Notes

  • Log in to OpenD manually before using Skills
  • Trading defaults to paper trading (SIMULATE). To use real trading, explicitly say "real" or "live", and confirm with your trading password
  • Be aware of API rate limits (e.g., 15 orders per 30 seconds) to avoid throttling
  • Subscription quotas are limited (100–2000). Release unused subscriptions periodically
  • To update Skills, re-download and extract to overwrite existing files