Stock Tools for Openclaw

A streamlined A-share market data tool for managing personal watchlists and fetching real-time price quotes through lightweight public APIs.

daguniang
v1.0.6
Apr 8, 2026
0
1.2k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install stock-tools

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 stock-tools 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 Stock Tools?

Stock Tools is a professional-grade extension for AI agents within the Openclaw Skills ecosystem, designed specifically for A-share market enthusiasts and developers. It bridges the gap between natural language interaction and structured financial data by providing a dual-capability system: persistent local storage for stock watchlists and a high-speed quote engine.

By prioritizing lightweight public interfaces (such as Sina Finance) over heavy scraping or memory-reliant LLM guesses, it ensures that users receive accurate, low-latency market data including current price, price change percentage, and daily highs/lows. The skill focuses on a natural conversational experience while maintaining the technical integrity of a CLI tool.

Stock Tools Use Cases

  • Managing a persistent personal stock watchlist for long-term tracking.
  • Fetching real-time quotes for specific A-share stocks using codes or names.
  • Getting a quick morning or afternoon performance summary of an entire portfolio.
  • Accessing direct links to detailed financial pages for deeper technical analysis.

How Stock Tools Works

  1. The AI agent identifies the user's intent, distinguishing between a management task (add/remove) or a data query.
  2. For market quotes, the system triggers a Node.js script to call lightweight, non-authenticated public APIs.
  3. For watchlist management, the agent performs CRUD operations on a local flat-file database located in the workspace.
  4. The raw data (JSON or plain text) is processed and formatted into a concise, human-readable natural language response.
  5. If market data is unavailable or unreliable, the system provides a transparent error state rather than hallucinating financial figures.

Stock Tools Setup

To integrate this skill into your environment, ensure you have Node.js installed and the following file structure in place:

# Navigate to your skills directory
cd skills/stock-tools

# Ensure the data directory exists for persistence
mkdir -p stocks-data

# The system uses the following script for real-time data
node scripts/fetch_quote.js <stock_code>

Stock Tools Data Schema & Taxonomy

The skill maintains data integrity through a simple, robust file-based system. Watchlist information is stored in a structured text file to ensure portability and ease of manual editing.

File Path Format Description
stocks-data/stocklist.txt `Code Name`
scripts/fetch_quote.js Node.js Script The execution logic for fetching external API data.

Example Entry:

  • 600519|Kweichow Moutai

Stock Tools Advanced Features

  • Bulk Quote Fetching: Support for querying multiple stock symbols in a single execution to reduce latency.
  • JSON Output Mode: Use the --json flag in the CLI for programmatic data processing and integration with other Openclaw Skills.
  • Smart Market Identification: Automatic prefixing of sh or sz based on stock code numbering conventions (e.g., codes starting with 6, 5, or 9 default to Shanghai).
  • Persistence Guarantee: Unlike context-based memory, the watchlist remains consistent across different chat sessions and agent restarts.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*