Search

PythonReactSEOPDF
OpenClaw

allstock-data

Stock market data query skill for China A-shares, Hong Kong, and US markets. Uses Tencent Finance HTTP API by default (lightweight, no install needed), with optional adata SDK for more comprehensive data. Supports real-time quotes, K-line history, order book analysis, and more.

hacksing0 source installs☆ 0 Repository stars

Installation

Follow the repository instructions for this skill and your agent. Review the files and dependencies before adding it to your workflow.

SkillHub CLI

skillhub install hacksing/allstock-data

Inspect the source and compatibility requirements, then follow its installation steps.

Give your agent the source link and ask it to inspect instructions and dependencies before explaining the installation steps.

View source ↗Guides

Skill instructions

Stock Data Query

Two data sources are supported. Tencent Finance HTTP API is used by default:

  1. Tencent Finance HTTP API (Default) — Lightweight, no installation, no proxy required
  2. adata SDK (Optional) — More comprehensive data, requires installation and possibly a proxy

1. Tencent Finance HTTP API (Default)

1.1 China A-Share Real-Time Quotes

Endpoint:

http://qt.gtimg.cn/q=<stock_code>

Stock Code Format:

Market Code Prefix Example
Shanghai Main Board sh600xxx sh600519 (Moutai)
STAR Market sh688xxx sh688111
Shenzhen Main Board sz000xxx sz000001 (Ping An Bank)
ChiNext (GEM) sz300xxx sz300033
ETF sz159xxx sz159919

Index Codes:

Index Code
SSE Composite (Shanghai) sh000001
SZSE Component (Shenzhen) sz399001
ChiNext Index sz399006
STAR 50 sz399987
CSI 300 sh000300

Examples:

# Single stock
curl -s "http://qt.gtimg.cn/q=sh600519"

# Multiple stocks
curl -s "http://qt.gtimg.cn/q=sh600519,sh000001,sz399001"

Response Fields:

v_sh600519="1~贵州茅台~600519~1460.00~1466.21~1466.99~14146~6374~7772~..."
          ~  Name    ~ Code  ~  Open  ~  High  ~   Low  ~ Volume
Index Field
0 Market code
1 Stock name
2 Stock code
3 Current price
4 Open price
5 Low price
6 High price
30 Price change
31 Change %

1.2 Hong Kong Stock Real-Time Quotes

Endpoint:

http://qt.gtimg.cn/q=hk<stock_code>

Examples:

# Tencent Holdings
curl -s "http://qt.gtimg.cn/q=hk00700"

# Alibaba
curl -s "http://qt.gtimg.cn/q=hk09988"

1.3 US Stock Real-Time Quotes

Endpoint:

http://qt.gtimg.cn/q=us<ticker>

Examples:

# Apple
curl -s "http://qt.gtimg.cn/q=us...

Source information

Source
github
Repository
openclaw/skills
Path
skills/hacksing/allstock-data
Version
—
Commit
825f3757eddd770424981bd0a5f68a60c844c417
Classification source
rules
Status
active
Visibility
public

These signals come from indexed source analysis and may lag behind changes. Check the current source files.

Extracted content

SKILL.md
# Stock Data Query

Two data sources are supported. **Tencent Finance HTTP API is used by default:**

1. **Tencent Finance HTTP API (Default)** — Lightweight, no installation, no proxy required
2. **adata SDK (Optional)** — More comprehensive data, requires installation and possibly a proxy

---

## 1. Tencent Finance HTTP API (Default)

### 1.1 China A-Share Real-Time Quotes

**Endpoint:**
```
http://qt.gtimg.cn/q=<stock_code>
```

**Stock Code Format:**

| Market | Code Prefix | Example |
|--------|-------------|---------|
| Shanghai Main Board | sh600xxx | sh600519 (Moutai) |
| STAR Market | sh688xxx | sh688111 |
| Shenzhen Main Board | sz000xxx | sz000001 (Ping An Bank) |
| ChiNext (GEM) | sz300xxx | sz300033 |
| ETF | sz159xxx | sz159919 |

**Index Codes:**

| Index | Code |
|-------|------|
| SSE Composite (Shanghai) | sh000001 |
| SZSE Component (Shenzhen) | sz399001 |
| ChiNext Index | sz399006 |
| STAR 50 | sz399987 |
| CSI 300 | sh000300 |

**Examples:**
```bash
# Single stock
curl -s "http://qt.gtimg.cn/q=sh600519"

# Multiple stocks
curl -s "http://qt.gtimg.cn/q=sh600519,sh000001,sz399001"
```

**Response Fields:**
```
v_sh600519="1~贵州茅台~600519~1460.00~1466.21~1466.99~14146~6374~7772~..."
          ~  Name    ~ Code  ~  Open  ~  High  ~   Low  ~ Volume
```

| Index | Field |
|-------|-------|
| 0 | Market code |
| 1 | Stock name |
| 2 | Stock code |
| 3 | Current price |
| 4 | Open price |
| 5 | Low price |
| 6 | High price |
| 30 | Price change |
| 31 | Change % |

---

### 1.2 Hong Kong Stock Real-Time Quotes

**Endpoint:**
```
http://qt.gtimg.cn/q=hk<stock_code>
```

**Examples:**
```bash
# Tencent Holdings
curl -s "http://qt.gtimg.cn/q=hk00700"

# Alibaba
curl -s "http://qt.gtimg.cn/q=hk09988"
```

---

### 1.3 US Stock Real-Time Quotes

**Endpoint:**
```
http://qt.gtimg.cn/q=us<ticker>
```

**Examples:**
```bash
# Apple
curl -s "http://qt.gtimg.cn/q=us...

Related skills

OpenClaw

humanpages

human-pages-ai

Search and hire real humans for tasks — photography, delivery, research, and more

OpenClaw

openclaw-skills

zseven-w

Reusable skill templates for OpenClaw AI agents. Templates for API integration, data processing, web scraping, CLI tools, and file processing.

OpenClaw

0xarchive

0xfantommenace

Query historical crypto market data from 0xArchive across Hyperliquid, Lighter.xyz, and HIP-3. Covers orderbooks, trades, candles, funding rates, open interest, liquidations, and data quality. Use when the user...

OpenClaw

1sec-security

cutmob

Install, configure, and manage 1-SEC — an open-source, all-in-one cybersecurity platform (16 modules, single binary) on Linux servers and VPS instances. Use when the user asks to secure a server, install securi...