tushare

Converts natural-language financial queries into Tushare data retrieval, analysis, and export workflows.

Updated Mar 22, 2026
One-click install
npx skills add https://github.com/meimeitou/xshare --skill tushare-meimeitou
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: tushare
Source: https://github.com/meimeitou/xshare/tree/main/tushare-data
Command: npx skills add https://github.com/meimeitou/xshare --skill tushare-meimeitou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires tushare, and includes scripts (resource) and references (resource) components.

What problem does it solve? Turning plain-language questions about Chinese stocks, funds, sectors, capital flows, and macro data into correct Tushare API calls is tedious and error-prone. This Skill interprets the user's intent, picks the right interfaces, retrieves and cleans the data, and delivers concise research summaries or exportable datasets. ## Core Features & Use Cases - Intent-driven data workflows: Maps requests like "how is this stock doing" or "which sector is strongest" to the right Tushare interfaces covering quotes, financials, valuation, money flow, sectors, announcements, news, and macro indicators. - Structured research output: Produces one-line conclusions, key metrics tables, risk notes, and exports results as CSV or Parquet with metadata for reuse and backtesting. - Robust retrieval rules: Handles entity resolution, date normalization, segmented fetching for long ranges, rate limiting, caching, and partial-failure reporting. - Use Case: Ask "compare Moutai, Wuliangye, and Luzhou Laojiao on one-year returns and valuation" and receive a normalized comparison table with a clear summary of which leads on each metric. ## Quick Start Ask the assistant to analyze a stock's recent performance, for example: "Show me how CATL has performed over the last three months and summarize the key numbers."

Frequently Asked Questions about tushare

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fetch A-share stock data with Tushare?▼

Set the TUSHARE_TOKEN environment variable, install the tushare Python package, then call interfaces like daily or pro_bar with a standard ts_code such as 600519.SH and a date range. Long ranges should be fetched in yearly or quarterly segments and merged.

How do I analyze a company's financial trends using Tushare?▼

Use the income interface for revenue and profit trends over the last eight quarters, and fina_indicator for ROE, gross margin, and net margin. Combine with balancesheet and cashflow to assess overall financial quality.

What Tushare token and permissions are required?▼

A TUSHARE_TOKEN from tushare.pro registration is required for authentication. Some interfaces such as real-time quotes or northbound capital flows require higher point levels, and the Skill flags permission limits instead of fabricating data.

Can Tushare data be exported for backtesting?▼

Yes. Data can be exported as CSV for medium-sized tables or Parquet for large datasets, with metadata recording the interface, parameters, fetch time, row counts, and any failed segments for reproducibility.

Why does a Tushare query return empty results?▼

Empty results can mean a non-trading day, a date range with no data, a stock not yet listed, incorrect parameters, or insufficient interface permissions. The Skill distinguishes these causes rather than assuming the interface is broken.

What are the limitations of this Tushare data skill?▼

It does not provide buy or sell advice, execute trades, or support millisecond-level real-time trading decisions. It also cannot bypass Tushare point or permission restrictions, and complex backtesting engines are outside its scope.