tenk-cli-0.1.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 (bid/ask) |
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 |
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) |
--proxy <URL> |
HTTP proxy URL |
-v, --verbose |
Enable verbose/debug output |
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
# 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
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