Tecent Finance
Get stock prices, quotes, and compare stocks using Tencent Finance API. No API key required. Supports US stocks, China A-Shares, Hong Kong stocks. Optimized for use in mainland Chi…
pz325
@pz325
What This Skill Does
Command-line tool to fetch real-time stock prices, detailed quotes, and compare multiple stocks using the Tencent Finance API. Supports US, China A-Share, Hong Kong, and crypto markets without requiring an API key.
Replaces Yahoo Finance API for users in mainland China by providing direct, stable access to Tencent Finance data without rate limits or proxy requirements.
When to Use It
- Check the latest price of a US stock like AAPL or TSLA
- Get a detailed quote including P/E ratio and market cap for a stock
- Compare performance of multiple stocks side by side
- Search for stock symbols by company name or keyword
- Retrieve real-time data for China A-Shares or Hong Kong stocks
- Monitor cryptocurrency prices like BTC-USD or ETH-USD
Install
$ openclaw skills install @pz325/tecent-financeTencent Finance CLI
A Python CLI for fetching stock data from Tencent Finance API.
Features
- ✅ No API key required - 无需申请 API Key
- ✅ Works in mainland China - 针对中国大陆网络环境优化,直接访问腾讯财经 API
- ✅ Fast & Stable - 比 Yahoo Finance API 更稳定,不受限流影响
- ✅ Multi-market support - 支持美股、A股、港股
Installation
chmod +x /path/to/skills/tencent-finance/tfin
ln -sf /path/to/skills/tencent-finance/tfin /usr/local/bin/tfin # Optional: global access
Commands
Price (quick check)
tfin AAPL # Quick price
tfin price AAPL # Same as above
Quote (detailed)
tfin quote MSFT
Compare
tfin compare AAPL,MSFT,GOOGL
tfin compare TSLA,NVDA
Search
tfin search "tesla"
tfin search "bitcoin"
Help
tfin help
tfin --help
Symbol Format
- US stocks: AAPL, MSFT, GOOGL, TSLA, NVDA
- China A-Shares: sh000001 (上证指数), sz399001 (深证成指), sh600519 (茅台)
- Hong Kong: hk00700 (腾讯), hk09988 (阿里), hk03690 (美团)
- Crypto: BTC-USD, ETH-USD
Examples
# Quick price check
tfin AAPL
tfin TSLA
# Detailed quote
tfin quote NVDA
# Compare tech giants
tfin compare AAPL,MSFT,GOOGL,META,AMZN
# Search
tfin search "apple"
tfin search "bitcoin"
# China stocks
tfin sh000001 # 上证指数
tfin quote hk00700 # 腾讯控股
Data Source
This tool uses Tencent Finance API (腾讯财经 API).
Why Tencent API?
- 在中国大陆网络环境下可直接访问,无需代理
- 比 Yahoo Finance API 更稳定,不受限流影响
- 数据覆盖美股、A股、港股等多个市场
Data includes:
- Current price (实时价格)
- Price change (absolute & percentage) (涨跌额/涨跌幅)
- Open, High, Low prices (开盘/最高/最低价)
- Previous close (昨收)
- Volume (成交量)
- Market cap (市值)
- P/E ratio (市盈率)
- P/B ratio (市净率)
Supported Markets
| Market | Example | Status |
|---|---|---|
| US Stocks | AAPL, TSLA, NVDA | ✅ Supported |
| China A-Shares | sh000001, sz399001 | ✅ Supported |
| Hong Kong | hk00700, hk09988 | ✅ Supported |
| Crypto | BTC-USD, ETH-USD | ✅ Supported |
| India NSE/BSE | RELIANCE.NS, TCS.BO | ❌ Not supported |
Comparison with Yahoo Finance
| Feature | Yahoo Finance (yfinance) | Tencent Finance (tfin) |
|---|---|---|
| Mainland China Access | Often blocked/restricted | ✅ Direct access |
| Rate Limiting | Frequent | ✅ Stable |
| US Stocks | ✅ Supported | ✅ Supported |
| China A-Shares | Limited | ✅ Full support |
| Hong Kong Stocks | Supported | ✅ Supported |
| Indian Stocks | ✅ Supported | ❌ Not supported |
| Options/Dividends | Supported | ❌ Not supported |
Requirements
- Python 3.7+
- requests
- rich
pip3 install requests rich
Troubleshooting
"No data found"
- Verify the symbol format
- Try with prefix:
usAAPLinstead ofAAPL - Some international markets may not be supported
Connection errors
- Check internet connection
- Tencent API is optimized for mainland China and generally very stable
License
MIT License
Author
Created by Menrfa
Top skills in this category
Stock Analysis
@udiedrichsenAnalyze stocks and cryptocurrencies using Yahoo Finance data. Supports portfolio management, watchlists with alerts, dividend analysis, 8-dimension stock scoring, viral trend detection (Hot Scanner), and rumor/early signal detection. Use for stock analysis, portfolio tracking, earnings reactions, crypto monitoring, trending stocks, or finding rumors before they hit mainstream.
Stock Market Pro
@kys42Yahoo Finance (yfinance) powered stock analysis skill: quotes, fundamentals, ASCII trends, high-resolution charts (RSI/MACD/BB/VWAP/ATR), plus optional web a...
A股量化 AkShare
@mbpzA股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
Stock Watcher
@robin797860Manage and monitor a personal stock watchlist with support for adding, removing, listing stocks, and summarizing their recent performance using data from 10jqka.com.cn. Use when the user wants to track specific stocks, get performance summaries, or manage their watchlist.
Intelligent Stocks Screener
@financial-ai-analyst基于东方财富数据库,支持通过自然语言输入筛选A港美股、基金、债券等多种资产,支持多元指标筛选,含技术面、消息面、基本面及市场情绪等,可用于全球资产速筛、跨市场监控、投资组合构建、策略回测等场景。返回结果包含数据说明及 csv 文件。Natural language screener for investment...