AllStock Data Query for Openclaw

A versatile stock market data retrieval tool supporting China A-shares, Hong Kong, and US markets via lightweight APIs and advanced SDKs.

hacksing
v1.0.2
Feb 28, 2026
1
4k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install allstock-data

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 allstock-data 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 AllStock Data Query?

The AllStock Data skill provides developers and AI agents with a robust interface to fetch market data across major global exchanges. By leveraging the Tencent Finance HTTP API as a lightweight default, users can access real-time pricing and historical trends without complex authentication. For advanced quantitative analysis, the skill integrates with the adata SDK, offering deeper insights into capital flows and sector classifications. This integration for Openclaw Skills ensures that financial applications and trading bots have reliable, low-latency access to the data they need.

This skill is designed to handle the nuances of different markets, including specific code prefixes for Shanghai, Shenzhen, Hong Kong, and US tickers. Whether you need a quick price check or a deep dive into historical data for backtesting, this tool provides the necessary endpoints and data structures to streamline financial data integration.

AllStock Data Query Use Cases

  • Monitoring real-time price fluctuations for China A-shares, HK, and US stocks
  • Conducting technical analysis using historical K-line data for daily, weekly, or monthly periods
  • Analyzing order book depth and buy/sell ratios to gauge market sentiment
  • Automating financial reports by fetching batch quotes and capital flow data
  • Building quantitative trading models using the comprehensive adata SDK integration for Openclaw Skills

How AllStock Data Query Works

  1. The agent identifies the market and stock code prefix (e.g., sh, sz, hk, or us) based on the user's request.
  2. For standard queries, it constructs a request to the Tencent Finance HTTP API for rapid data retrieval without requiring a proxy.
  3. The skill parses the raw response fields, extracting critical metrics such as current price, open/high/low values, and percentage changes.
  4. For historical requests, it utilizes the K-line endpoint with specific adjustment parameters (forward or backward adjusted) to ensure data accuracy.
  5. For complex analysis like capital flow or financial statements, it invokes the adata SDK to pull structured data frames for processing.

AllStock Data Query Setup

The default Tencent Finance API requires no additional installation or configuration. To enable advanced features via the adata SDK, follow these steps:

pip install adata

If your environment requires a proxy for data fetching, configure it as follows:

import adata
adata.proxy(is_proxy=True, ip='your-proxy-ip:port')

Note that this setup enhances the capabilities of Openclaw Skills by providing access to fundamental data and capital flow analytics.

AllStock Data Query Data Schema & Taxonomy

The skill organizes market data into structured responses based on the selected source and query type:

Source Data Type Key Fields
Tencent API Real-time Market code, Name, Current Price, Change%, Volume
Tencent API K-Line Date, Open, Close, High, Low, Volume
adata SDK Fundamental Share capital, SW industry classification, Concept sectors
adata SDK Analytical Capital flow, Level-2 order book, ETF quotes

All responses from the Tencent Finance API are decoded from GBK to ensure compatibility with modern Openclaw Skills workflows.

AllStock Data Query Advanced Features

  • Multi-market support spanning Shanghai, Shenzhen, STAR Market, ChiNext, HKEX, and US exchanges (NYSE/NASDAQ)
  • Dual-source architecture allowing a choice between lightweight HTTP requests or a full-featured Python SDK for deep analysis
  • Support for forward-adjusted and backward-adjusted K-line data to support precise historical backtesting
  • Automated batch query capabilities to minimize network overhead and respect request rate limits
  • Integration of Level-2 order book data for tracking internal vs external trade ratios and market sentiment

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*