Tecent Finance 1
by @sunerw-dev
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 China.
clawhub install tecent-finance-1📖 About This Skill
name: tencent-finance description: 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 China.
Tencent Finance CLI
A Python CLI for fetching stock data from Tencent Finance API.
Features
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
Examples
# Quick price check
tfin AAPL
tfin TSLADetailed quote
tfin quote NVDACompare tech giants
tfin compare AAPL,MSFT,GOOGL,META,AMZNSearch
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?
Data includes:
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
pip3 install requests rich
Troubleshooting
"No data found"
usAAPL instead of AAPLConnection errors
License
MIT License
Author
Created by Menrfa
💡 Examples
# Quick price check
tfin AAPL
tfin TSLADetailed quote
tfin quote NVDACompare tech giants
tfin compare AAPL,MSFT,GOOGL,META,AMZNSearch
tfin search "apple"
tfin search "bitcoin"China stocks
tfin sh000001 # 上证指数
tfin quote hk00700 # 腾讯控股
📋 Tips & Best Practices
"No data found"
usAAPL instead of AAPL