Market Data Hub for Openclaw

A high-performance stock market data acquisition and technical analysis engine supporting multiple data sources and intelligent failover.

paul1989889
v1.0.0
Mar 6, 2026
0
928
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install market-data-hub

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 market-data-hub 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 Market Data Hub?

Market Data Hub is a robust tool designed for developers building financial applications and quantitative trading bots. It serves as a centralized gateway to fetch A-share market data from reliable sources like Tencent Finance, AKShare, and Baostock. By integrating features like automatic rate limiting and circuit breaking, it ensures stable data retrieval even under heavy load, making it a reliable component for any project using Openclaw Skills.

This skill simplifies the process of obtaining clean, structured financial data, allowing you to focus on building trading strategies or analytics dashboards rather than managing raw API connections. Whether you need lightning-fast real-time quotes or deep historical K-line data enriched with technical indicators, this Openclaw Skills implementation provides a unified interface to handle the complexities of financial data pipelines.

Market Data Hub Use Cases

  • Building automated trading bots that require real-time A-share price monitoring.
  • Conducting quantitative research using high-quality historical K-line data and technical indicators.
  • Developing financial dashboards that aggregate capital flow and top-gainer (Long-Hu Bang) data.
  • Creating stock alert systems based on technical signals like MACD crossovers or RSI overbought conditions.

How Market Data Hub Works

  1. The user initializes the Market Data Hub class, optionally defining custom rate limits and data source priorities.
  2. When a data request is triggered (e.g., get_kline), the system checks the internal Token Bucket limiter to ensure compliance with provider constraints.
  3. The hub attempts to fetch data from the primary source defined in the priority list, typically optimizing for either speed or historical accuracy.
  4. If a primary source fails or times out, the built-in circuit breaker and retry logic automatically failover to a backup data source.
  5. For analytical requests, raw data is passed through specialized modules to calculate technical indicators like MA, MACD, or Bollinger Bands.
  6. Structured data is returned as a JSON object or a Pandas DataFrame for seamless integration into wider Openclaw Skills workflows.

Market Data Hub Setup

To get started with this skill, ensure you have Python 3.8+ installed. Install the necessary dependencies using pip:

pip install akshare baostock pandas requests

You can then initialize the hub and start fetching data immediately:

from src import MarketDataHub
hub = MarketDataHub()
# Get real-time quote for a specific stock
quote = hub.get_realtime_quote('300502')

Market Data Hub Data Schema & Taxonomy

Market Data Hub standardizes financial data into predictable formats to ensure compatibility across different sources within Openclaw Skills.

Field Type Description
symbol String The stock code (e.g., '300502')
price Float Current trading price
change_pct Float Percentage change from previous close
volume Integer Trading volume
source String The origin of the data (tencent, akshare, or baostock)

Historical K-line data is returned as a Pandas DataFrame with standard OHLCV (Open, High, Low, Close, Volume) columns along with calculated technical indicator columns if requested.

Market Data Hub Advanced Features

  • Multi-source failover strategy ensuring high data availability for Openclaw Skills agents.
  • Token Bucket algorithm implementation for sophisticated rate limiting and burst management.
  • Comprehensive technical indicator suite including MACD, RSI, KDJ, and Bollinger Bands.
  • Customizable source priority (e.g., prioritizing Baostock for quality or Tencent for speed).
  • Integrated usage statistics to monitor request counts and failure rates across all providers.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*