tenk
A Rust library for fetching market data from multiple sources.
Installation
[]
= "0.1"
= { = "1.35", = ["full"] }
Quick Start
use ;
use ;
async
Examples
API Reference
Stock Data
// All stock codes
let codes = client.get_all_codes.await?;
// Stock info
let info = client.get_stock_info.await?;
// Historical K-line (Daily/Weekly/Monthly/Quarterly/Min5/Min15/Min30/Min60)
let data = client
.get_market
.await?;
// Current prices (batch)
let prices = client.get_market_current.await?;
// Minute data (intraday)
let minutes = client.get_market_min.await?;
// Order book
let orderbook = client.get_order_book.await?;
// Tick data
let ticks = client.get_ticks.await?;
// Stock valuation metrics
use EastMoneySource;
let source = default;
let valuation = source.get_valuation.await?;
// Top shareholders
use HoldingsSource;
let holders = source.get_top_holders.await?;
// Fund holdings
let funds = source.get_fund_holdings.await?;
// Dividend history
use DividendSource;
let dividends = source.get_dividends.await?;
ETF Data
// All ETF codes
let etfs = client.get_all_etf_codes.await?;
// ETF current prices
let prices = client.get_etf_current.await?;
// ETF K-line
let data = client
.get_etf_market
.await?;
// ETF minute data
let minutes = client.get_etf_min.await?;
Bond Data
// All convertible bond codes
let codes = client.get_all_bond_codes.await?;
// All bond quotes
let bonds = client.get_bond_current.await?;
// Specific bonds
let bonds = client.get_bond_current.await?;
Market Data
use *;
use EastMoneySource;
let source = default;
// Capital flow
let flow = source.get_capital_flow.await?;
// Billboard list
let billboard = source.get_billboard_list.await?;
// Earnings forecast
let forecast = source.get_earnings_forecast.await?;
// Stock Connect data
let connect = source.get_stock_connect.await?;
// Margin trading
let margin = source.get_margin_trading.await?;
// IPO list
let ipo = source.get_ipo_list.await?;
// Block trades
let blocks = source.get_block_trades.await?;
// Institutional research
let research = source.get_institutional_research.await?;
// Research reports
let reports = source.get_research_reports.await?;
News Data
use NewsSource;
// Get latest news
let news = source.get_news_list.await?;
// Search news
let results = source.search_news.await?;
// Read full content
let content = source.get_news_content.await?;
Data Sources
- EastMoney
- Sina
- THS
License
MIT