tenk-cli-0.2.0 is not a library.
tenk-cli
A command-line interface and MCP server for fetching market data from multiple sources.
Build and Run
# Build
# Run
MCP Server
Run as MCP server:
Cursor Configuration
Available MCP Tools
| Tool | Description |
|---|---|
stock_quote |
Get current quotes for stocks |
stock_kline |
Get historical K-line data |
stock_minute |
Get intraday minute data |
stock_orderbook |
Get order book |
stock_ticks |
Get tick-by-tick trades |
stock_info |
Get stock details |
stock_list |
List all stock codes |
etf_quote |
Get current ETF quotes |
etf_kline |
Get ETF K-line data |
etf_minute |
Get ETF minute data |
etf_list |
List all ETF codes |
bond_quote |
Get bond quotes (with top gainers/losers/volume filters) |
bond_list |
List convertible bonds |
news_list |
Get latest finance news by category |
news_read |
Read full news content by ID |
capital_flow |
Get real-time capital flow data for stocks |
capital_flow_history |
Get historical capital flow data for a stock |
billboard_list |
Get Billboard list |
billboard_detail |
Get Billboard details for a stock |
earnings_forecast |
Get earnings forecast data |
stock_connect |
Get Stock Connect data |
margin_trading |
Get margin trading data for a stock |
ipo_list |
Get IPO list |
block_trades |
Get block trade list |
institutional_research |
Get institutional research list |
research_reports |
Get research reports |
Usage
Global Options
| Option | Description |
|---|---|
-f, --format <FORMAT> |
Output format: json, table (default), csv |
-o, --output <FILE> |
Save output to file instead of stdout |
-s, --source <SOURCE> |
Data sources: eastmoney, sina, ths (default: all) |
-L, --lang <LANG> |
Output language: en (default), zh-CN |
--proxy <URL> |
HTTP proxy URL |
-v, --verbose |
Enable verbose/debug output |
Language Support
The CLI supports multiple output languages for table headers, messages, and labels:
# English output (default)
# Chinese output
# Or use environment variable
Supported languages:
en- English (default)zh-CN- Simplified Chinese
Commands
Stock Commands
# Get real-time quotes for stocks
# Get daily K-line data
# Get weekly K-line for date range
# Get last 10 daily records
# Get 5-minute K-line data
# Get minute-level data for today
# Get order book (5-level bid/ask)
# Get tick data (last 50 ticks)
# Get stock information
# Get stock valuation metrics (PE, PB, Market Cap, EPS, ROE, etc.)
# Get top 10 shareholders
# Get fund holdings
# Get dividend history
# List all stocks
# List stocks by exchange
ETF Commands
# Get real-time ETF quotes
# Get ETF K-line data
# Get ETF K-line for date range
# Get ETF minute data
# List all ETFs
# List ETFs by exchange
Bond Commands
# Get all convertible bond quotes
# Get specific bond quotes
# Get top 10 gainers
# Get top 10 losers
# Get top 10 by volume
# List all convertible bonds
Market Commands
# Get real-time capital flow for stocks
# Get historical capital flow for a stock
# Get Billboard list (defaults to today)
# Get Billboard list for specific date
# Get Billboard details for a stock
# Get earnings forecast
# Get earnings forecast for specific period
# Get Stock Connect data
# Get margin trading data for a stock
# Get IPO list
# Get block trade list
# Get institutional research list
# Get research reports
# Get research reports for a specific stock
News Commands
# Get latest finance news
# Get news by category
# Search news by keyword
# Read full news content
Output Formats
# Table output (default) - pretty formatted
# JSON output - for scripting
# CSV output - for spreadsheets
# Save output to file
Select Data Source
# Use only EastMoney source
# Use only Sina source
# Use THS then Sina as fallback
License
MIT