Tushare (Chinese Financial Data) for Openclaw

A specialized financial data interface for fetching comprehensive Chinese stock, futures, and macroeconomic datasets via the Tushare API.

wdblink
v1.0.0
Feb 5, 2026
3
4.1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install tushare-base

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 tushare-base 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 Tushare (Chinese Financial Data)?

Tushare is a robust data interface skill designed to provide developers and AI agents with seamless access to the Chinese financial ecosystem. By wrapping the Tushare Pro API, this skill enables programmatic retrieval of A-share market quotes, futures contract details, and fundamental company information. It is a critical component for anyone building financial analysis tools or quantitative trading models within the Openclaw Skills ecosystem.

This skill simplifies the complexity of Chinese market data by providing a unified CLI interface to query data from major exchanges, including the Shanghai Stock Exchange (SSE) and Shenzhen Stock Exchange (SZSE). Beyond just price action, it offers deep insights into market liquidity through money flow data and provides a bird's-eye view of the Chinese economy via macroeconomic indicators like GDP and CPI.

Tushare (Chinese Financial Data) Use Cases

  • Tracking real-time price movements for Chinese A-shares and indices.
  • Retrieving historical daily, weekly, or monthly candlestick data for technical analysis.
  • Monitoring capital movement through money flow analysis for specific securities.
  • Researching futures contracts across major exchanges like CFFEX, SHFE, and DCE.
  • Analyzing macroeconomic trends using official GDP, CPI, and PPI data points.

How Tushare (Chinese Financial Data) Works

  1. The user initiates a request via a specific command, such as daily or fut_daily, along with required parameters like a stock code or date range.
  2. The skill validates the presence of the TUSHARE_TOKEN environment variable to ensure authorized access.
  3. A request is dispatched to the Tushare Pro API servers using the official Python SDK.
  4. The raw API response is processed into a structured pandas DataFrame for efficient data manipulation.
  5. The skill outputs the formatted financial data directly to the terminal or calling agent for immediate analysis.

Tushare (Chinese Financial Data) Setup

To integrate this capability into your Openclaw Skills environment, follow these steps:

  1. Register for an account at Tushare Pro to receive your API token.
  2. Set up your environment variable:
export TUSHARE_TOKEN="your-api-token-here"
source ~/.zshrc
  1. Install the required libraries:
pip3 install tushare pandas --user

Tushare (Chinese Financial Data) Data Schema & Taxonomy

The skill returns structured data optimized for financial modeling. Below is the primary metadata taxonomy:

Category Description Common Fields
Stock Data Equity market information ts_code, trade_date, open, close, vol, amount
Futures Data Commodity and index futures ts_code, symbol, exchange, fut_code, delivery_month
Macro Data Economic indicators period, value, growth_rate, prev_value
Money Flow Liquidity tracking buy_sm_vol, sell_sm_vol, buy_lg_amount, sell_lg_amount

Note: Stock codes must use the exchange suffix (e.g., .SZ or .SH) and futures must use the exchange code (e.g., .SHF or .CFX).

Tushare (Chinese Financial Data) Advanced Features

  • Support for multiple market frequencies including daily, weekly, and monthly aggregations.
  • Real-time quote retrieval for immediate market monitoring.
  • Comprehensive futures holding rankings to track market sentiment and institutional positioning.
  • Detailed company profile and fundamental data access for value-based research.
  • Seamless integration with pandas for advanced data cleaning and transformation within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*