TickFlow Data
使用 TickFlow Python SDK 获取 A 股、港股、美股、期货等市场的实时行情和 K 线数据 Skill: TickFlow Data Owner: tickflow-dev Summary: 使用 TickFlow Python SDK 获取 A 股、港股、美股、期货等市场的实时行情和 K 线数据 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-04-01T02:24:39.060Z | user tickflow 1.0.2 - 文档示例中的 tf.instruments.get 替换为 tf.instruments.batch,与 SDK 接口对齐,并修正相应代码演示。 - 其他文档内容和功能保持不变。 v1.0.1 | 2026-03-29T13:38:42.536Z | user - 增加对港股(HK)和美股(US)市场的实时行情与历史 K 线支持,A 股、期货市场支持不变 - 文档新增港股、美股的代码格式说明与批量查询示例 - 更新常用市场后缀表,补充美股、
Rank
62
Safety
84
Downloads
2.2k
Updated
Oct 9, 2026
Version
1.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 2.2K downloads reported by the source. Last updated 10/9/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 9, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 9, 2026
- Adoption signal
- 2.2K downloadsadoption · observed Oct 9, 2026
- Latest release
- 1.0.2release · observed Apr 1, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s17bf48hn7va0xm98tzsba0g7d83vhw2:tickflow- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-tickflow-dev-tickflow/snapshot"
Documentation
CLAWHUB
41,685 characters of source documentation, loaded on request.
Extracted files
3 files captured from the source.
SKILL.md
---
name: tickflow
description: 使用 TickFlow Python SDK 获取 A 股、港股、美股、期货等市场的实时行情和 K 线数据
homepage: https://tickflow.org
metadata: {"clawdbot":{"emoji":"📈","requires":{"bins":["python3","uv"],"env":["TICKFLOW_API_KEY"]}}}
---
# TickFlow Skill
通过 TickFlow Python SDK 获取 A 股、港股、美股、期货等市场的实时行情、K 线数据。支持多市场、多周期,适用于量化交易、数据分析等场景。
## 环境配置
### 1. 安装 uv(如果未安装)
检查 uv 是否已安装:
```bash
uv --version
```
如果未安装,运行官方安装脚本:
```bash
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
### 2. 配置 TickFlow 工作环境
在当前 skills 项目下创建 `python` 文件夹并初始化:
```bash
# 创建 python 工作目录
mkdir -p python
cd python
# 创建 pyproject.toml 文件
cat > pyproject.toml << 'EOF'
[project]
name = "tickflow-workspace"
version = "0.1.0"
description = "TickFlow workspace for market data analysis"
requires-python = ">=3.10"
dependencies = [
"tickflow[all]>=0.1.17",
]
EOF
# 使用 uv 同步依赖
uv sync
```
完成后,`python` 文件夹将作为你的 TickFlow 工作目录。
### 3. 配置 API Key
访问 [tickflow.org](https://tickflow.org) 获取 API Key,然后配置环境变量:
```bash
# macOS/Linux
export TICKFLOW_API_KEY="your-api-key"
# Windows (PowerShell)
$env:TICKFLOW_API_KEY="your-api-key"
```
建议将环境变量添加到 shell 配置文件(如 `~/.zshrc` 或 `~/.bashrc`)中:
```bash
echo 'export TICKFLOW_API_KEY="your-api-key"' >> ~/.zshrc
source ~/.zshrc
```
## 标的代码格式
所有查询使用统一格式:**代码.市场后缀**(例如:`600000.SH`)
### 常用市场后缀
| 后缀 | 市场 | 说明 |
|------|------|------|
| **SH** | 上海证券交易所 | 沪市 A 股、ETF、债券等 |
| **SZ** | 深圳证券交易所 | 深市 A 股、创业板、ETF 等 |
| **BJ** | 北京证券交易所 | 北交所股票 |
| **SHF** | 上海期货交易所 | 上期所期货 |
| **DCE** | 大连商品交易所 | 大商所期货 |
| **ZCE** | 郑州商品交易所 | 郑商所期货 |
| **CFX** | 中国金融期货交易所 | 中金所股指/国债期货 |
| **INE** | 上海国际能源交易中心 | 原油等期货 |
| **GFE** | 广州期货交易所 | 广期所期货 |
| **US** | 美股 | 美国证券市场 |
| **HK** | 港股 | 香港联交所 |
### 标的代码示例
- A 股:`600000.SH`(浦发银行)、`000001.SZ`(平安银行)、`920662.BJ`(北交所股票)
- 美股:`AAPL.US`(苹果)、`TSLA.US`(特斯拉)、`MSFT.US`(微软)
- 港股:`00700.HK`(腾讯控股)、`09988.HK`(阿里巴巴)
- ETF:`510300.SH`(沪深300ETF)、`159915.SZ`(创业板ETF)
- 指数:`000001.SH`(上证指数)、`399006.SZ`(创业板指数)
- 期货:`au2604.SHF`(黄金期货)、`i2605.DCE`(铁矿石期货)
### 目前支持状态
- **A 股(SH / SZ / BJ)**:已支持。可查实时行情、日 K、分钟 K、日内分时、财务数据、标的池(如 `CN_Equity_A`)等。
- **国内期货(SHF / DCE / ZCE / CFX / INE / GFE)**:支持主力合约查询。按合约代码 + 后缀查询(如 `au2604.SHF`)。
- **美股(US)**:已支持。实时行情、全量历史日 K 线(支持前复权/后复权)、除权因子、标的池(`US_Equity`)。
- **港股(HK)**:已支持。实时行情、全量历史日 K 线(支持前复权/后复权)、除权因子、标的池(`HK_Equity`)。
## 快速开始
### 免费服务(适合历史数据分析)
无需 API Key,直接使用:
```python
from tickflow import TickFlow
tf = TickFlow.free()
# 获取历史日 K 线
df = tf.klines.get("600000.SH", period="1d", count=100, as_dataframe=True)
print(df.tail())
# 查询标的信息
instruments = tf.instruments.batch(symbols=["600000.SH", "000001.SZ"])
for inst in instruments:
print(f"{inst['symbol']}: {inst['name']}")
```
**免费服务特点:**
- ✅ 历史日 K 线(1d、1w、1M、1Q、1Y)
- ✅ 标的信息、交易所、标的池查询
- ❌ 不支持实时行情
- ❌ 不支持分钟级 K 线(1m、5m、15m、30m、60m)
### 完整服务(实时行情 + 全部功能)
使用已配置的 API Key:
```python
from tickflow import TickFlow
# 自动读取环境变量 TICKFLOW_API__meta.json
{
"ownerId": "kn77zp5ebp2gs5gdk2f6q1mexx82n7rz",
"slug": "tickflow",
"version": "1.0.2",
"publishedAt": 1775010279060
}skill-card.md
## Description: Uses the TickFlow Python SDK to retrieve real-time quotes and K-line data for A-share, Hong Kong, U.S. equity, and futures markets. This skill is ready for commercial/non-commercial use. ## Publisher: [tickflow-dev](https://clawhub.ai/user/tickflow-dev) ### License/Terms of Use: MIT-0 ## Use Case: Developers, data analysts, and quantitative researchers use this skill to set up TickFlow SDK workflows and generate examples for retrieving market quotes, historical and intraday K-line data, instrument metadata, and financial data. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: Setup guidance includes install steps that should be reviewed before execution. Mitigation: Install uv through a trusted package manager or verified release before running TickFlow examples. Risk: API key setup guidance may encourage storing TICKFLOW_API_KEY in shell startup files. Mitigation: Store TICKFLOW_API_KEY in a password manager, OS keychain, or local uncommitted environment file. Risk: Dependency installation can change over time if package versions are not pinned. Mitigation: Pin and lock Python dependencies for repeatable agent environments. ## Reference(s): - [TickFlow homepage](https://tickflow.org) - [ClawHub TickFlow skill page](https://clawhub.ai/tickflow-dev/skills/tickflow) - [uv installer for macOS/Linux](https://astral.sh/uv/install.sh) - [uv installer for Windows PowerShell](https://astral.sh/uv/install.ps1) ## Skill Output: **Output Type(s):** [text, markdown, code, shell commands, configuration, guidance] **Output Format:** [Markdown with Python and shell command examples] **Output Parameters:** [1D] **Other Properties Related to Output:** [May require python3, uv, and TICKFLOW_API_KEY for full real-time data workflows.] ## Skill Version(s): 1.0.2 (source: server release metadata) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/tickflow-dev/skills/tickflow",
"sourceUrl": "https://clawhub.ai/tickflow-dev/skills/tickflow",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T17:44:59.326Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tickflow-dev-tickflow/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tickflow-dev-tickflow/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-09T17:44:59.326Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "2.2K downloads",
"href": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceUrl": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-09T17:44:59.326Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceUrl": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-01T02:24:39.060Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-tickflow-dev-tickflow/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-tickflow-dev-tickflow/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "tickflow 1.0.2 - 文档示例中的 `tf.instruments.get` 替换为 `tf.instruments.batch`,与 SDK 接口对齐,并修正相应代码演示。 - 其他文档内容和功能保持不变。",
"href": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceUrl": "https://clawhub.ai/tickflow-dev/tickflow",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-04-01T02:24:39.060Z",
"isPublic": true
}
]
}Record generated Oct 9, 2026.
