mcp-data-gateway
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMCP数据网关
MCP Data Gateway
统一访问多个金融数据源,提供一致的查询接口。
Unified access to multiple financial data sources, providing a consistent query interface.
支持的数据源
Supported Data Sources
| 数据源 | 类型 | 覆盖范围 |
|---|---|---|
| Yahoo Finance | 股票、ETF、指数 | 全球市场 |
| Alpha Vantage | 股票、外汇、加密货币 | 美股为主 |
| Tushare | A股、港股、中概股 | 中国市场 |
| Binance | 加密货币 | 主要币种 |
| Data Source | Type | Coverage |
|---|---|---|
| Yahoo Finance | Stocks, ETFs, Indices | Global Markets |
| Alpha Vantage | Stocks, Forex, Cryptocurrencies | US Stocks Focus |
| Tushare | A-shares, Hong Kong Stocks, Chinese Concept Stocks | Chinese Markets |
| Binance | Cryptocurrencies | Major Coins |
查询功能
Query Features
实时行情
Real-time Quotes
- 股价、涨跌幅、成交量
- 实时报价、日内高低
- 52周高低
- Stock price, price change percentage, trading volume
- Real-time quotes, intraday high and low
- 52-week high and low
历史数据
Historical Data
- 历史K线(日/周/月)
- 历史分红、拆股
- 财务报表数据
- Historical K-lines (Daily/Weekly/Monthly)
- Historical dividends, stock splits
- Financial statement data
财务数据
Financial Data
- 收入、盈利、ROE
- 资产负债表
- 现金流量表
- Revenue, earnings, ROE
- Balance sheet
- Cash flow statement
使用方式
Usage
优先使用默认数据源,自动失败转移:
rust
// 获取报价
let quote = gateway.get_quote("AAPL").await?;
// 获取财务数据
let fundamental = gateway.get_fundamental("AAPL").await?;
// 获取历史K线
let history = gateway.get_history("AAPL", Period::Daily, 1).await?;Priority use of default data sources with automatic failover:
rust
// Get quote
let quote = gateway.get_quote("AAPL").await?;
// Get fundamental data
let fundamental = gateway.get_fundamental("AAPL").await?;
// Get historical K-lines
let history = gateway.get_history("AAPL", Period::Daily, 1).await?;数据源选择策略
Data Source Selection Strategy
- 美股: Yahoo Finance → Alpha Vantage
- A股: Tushare → Yahoo Finance
- 加密货币: Binance → Yahoo Finance
- US Stocks: Yahoo Finance → Alpha Vantage
- A-shares: Tushare → Yahoo Finance
- Cryptocurrencies: Binance → Yahoo Finance
工具和详细文档
Tools and Detailed Documentation
- 📁 API接口文档
- 📁 数据源配置
- 📁 Rust实现参考
- 🔧 data_gateway.py - 命令行工具
- 📁 API Reference
- 📁 Data Source Configuration
- 📁 Rust Implementation Reference
- 🔧 data_gateway.py - Command-line Tool