skillfed

tushare

Tushare is a financial data interface that unifies access to market quotes and fundamentals through standardized APIs. It covers stocks, funds, futures, digital currencies, and corporate financials, designed for developers needing lightweight, real-time data retrieval.

Tushare provides standardized API access to financial market data including stocks, funds, futures, and cryptocurrencies.

AI-generated summary based on this skill's SKILL.md

28,096 4,557 MIT updated by HKUDS

Install

HKUDS/Vibe-Trading/tushare · repository language: Python

git clone https://github.com/HKUDS/Vibe-Trading
cp -r Vibe-Trading/agent/src/skills/tushare ~/.claude/skills/tushare
npx skillfed install HKUDS/Vibe-Trading/tushare

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

What is tushare and what financial data does it provide?

Tushare is a financial data interface that unifies access to market quotes and fundamentals through standardized APIs. It covers stocks, funds, futures, digital currencies, and corporate financials, designed for developers needing lightweight, real-time data retrieval. Tushare supports Chinese and international markets, making it ideal for trading and research applications.

Can tushare retrieve real-time and historical stock price data?

Yes, tushare provides real-time and historical price quotes across multiple asset classes including stocks, funds, and futures. You can access standardized financial market data APIs through tushare to retrieve comprehensive pricing information for both Chinese and international markets in a lightweight Python format.

How do I get stock price history using tushare in Python?

Tushare offers standardized APIs to retrieve stock price history in Python. After installation and token registration, you can query historical price data across stocks, funds, and futures. The library returns data in a lightweight format suitable for integration into trading and research applications.

Does tushare support Chinese stock data and international markets?

Tushare provides comprehensive coverage of Chinese stock market data, Hong Kong stocks, US stocks, and other international markets. It delivers real-time and historical quotes through standardized APIs, making it a unified solution for accessing both domestic and global financial market data in Python.

What fundamental company data and financial indicators can tushare access?

Tushare enables retrieval of fundamental company data and financial indicators for analysis. You can access corporate financial metrics alongside market quotes, supporting comprehensive financial analysis workflows. The data is available through standardized APIs designed for easy integration into analytical and trading applications.

What license does tushare use and how do I get started?

Tushare is released under the MIT license, making it freely available for open-source and commercial use. Getting started requires installation via Python package management and token registration to access the financial data APIs. Once configured, you can immediately begin querying stocks, funds, futures, and other asset classes.

SKILL.md

rendered from the published skill — quoted content, verbatim

Tushare

概述

tushare是一个财经数据接口包,拥有丰富的数据内容,如股票、基金、期货、数字货币等行情数据,公司财务、基金经理等基本面数据。该模块通过标准化API方式统一了数据资产的对外服务方式,以帮助有需要的技术用户更实时、简洁、轻量的使用相关数据。

快速上手

  • 安装python运行环境(推荐python3.7+),并安装tushare依赖包(推荐从清华pypi镜像安装)。
pip install tushare -i https://pypi.tuna.tsinghua.edu.cn/simple
  • Tushare官网注册,获取token,并配置环境变量。 注册地址
export TUSHARE_TOKEN=your_token
  • 查询Tushare接口文档,找到对应的接口。 在线数据接口文档
  • 根据接口文档,使用python代码获取数据。(如股票列表接口)
import os
import tushare as ts

# 读取环境变量中的token, 或者读取本地记录的token
token = os.getenv('TUSHARE_TOKEN') or ts.get_token()

# 初始化pro接口实例
pro = ts.pro_api(token)

# 查询数据接口(*股票列表*),获取上市交易的股票列表
df = pro.stock_basic(list_status='L', fields='ts_code,symbol,name,area,industry,list_date')
print(df)

参数格式说明

  • 日期:YYYYMMDD(如 20241231)
  • 股票代码:ts_code 格式(如 000001.SZ, 600000.SH)
  • 返回格式:pandas DataFrame

> 链接约定:本文档内所有指向 references/ 的链接均以 技能名前缀 书写(如 tushare/references/...)。read_file 工具以 skills/

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 15 files
agent/src/skills/tushare/SKILL.md
agent/src/skills/tushare/references/ETF专题/ETF份额规模.md
agent/src/skills/tushare/references/ETF专题/ETF历史分钟.md
agent/src/skills/tushare/references/ETF专题/ETF基准指数.md
agent/src/skills/tushare/references/ETF专题/ETF基本信息.md
agent/src/skills/tushare/references/ETF专题/ETF复权因子.md
agent/src/skills/tushare/references/ETF专题/ETF实时分钟.md
agent/src/skills/tushare/references/ETF专题/ETF实时日线.md
agent/src/skills/tushare/references/ETF专题/ETF日线行情.md
agent/src/skills/tushare/references/债券专题/债券回购日行情.md
agent/src/skills/tushare/references/债券专题/全球财经事件.md
agent/src/skills/tushare/references/债券专题/可转债发行.md
agent/src/skills/tushare/references/债券专题/可转债基础信息.md
agent/src/skills/tushare/references/债券专题/可转债技术面因子(专业版).md
agent/src/skills/tushare/references/债券专题/可转债票面利率.md

Related skills

Tags

market-data-provider python-finance-library multi-asset-coverage standardized-api-interface real-time-quotes historical-ohlc fundamental-metrics cross-market-data lightweight-sdk token-based-access