Expand description
§akshare-rs
100% pure Rust implementation of akshare — unified access to Chinese and global financial market data APIs.
§Quick Start
use akshare::AkShareClient;
let client = AkShareClient::new();
// A-share quote
let quote = client.a_share_quote("600000").await?;
// A-share candles
let candles = client.a_share_candles("600000", "qfq", 60).await?;
// US stock candles
let us_candles = client.us_candles("AAPL", 30).await?;
// HK stock quote
let hk_quote = client.hk_quote("00593").await?;§Data Sources
| Provider | Coverage |
|---|---|
| Eastmoney | A-share search, quotes, klines, sectors, billboard, capital flow |
| Sina Finance | A-share real-time, US daily, bonds, forex |
| Tencent Finance | A-share/HK real-time quotes and klines |
| Yahoo Finance | HK/US/global stock charts |
| Stooq | US/global stock CSV data (fallback) |
| SEC EDGAR | US company fundamentals and filings |
| Tushare Pro | Chinese market daily data, financials, trade calendar |
§Module Overview
§Equity Markets
§Derivatives
| Module | Description | Functions |
|---|---|---|
futures | Domestic exchanges, spot prices, warehouse stocks | 109 |
option | SSE, CZCE, CFFEX, commodity options | 48 |
§Funds & Fixed Income
| Module | Description | Functions |
|---|---|---|
fund | ETF, LOF, ranked lists, holdings | 98 |
bond | Government, corporate, convertible bonds | 51 |
reits | REITs data from Eastmoney | 5 |
§Macro & Economy
| Module | Description | Functions |
|---|---|---|
macro_data | China, US, EU, UK, Japan GDP/CPI/PMI | 423 |
economy | Events, articles, NLP sentiment | 62 |
§FX, Crypto & Commodities
| Module | Description | Functions |
|---|---|---|
forex | BOC rates, cross rates, real-time | 19 |
crypto | Bitcoin and major crypto data | 4 |
commodity | Commodity prices, carbon trading | 9 |
spot | Spot market prices (SGE, hog, futures) | 14 |
§Other
| Module | Description | Functions |
|---|---|---|
news | Financial news from multiple sources | 6 |
bank | Banking regulatory data | 1 |
cal | Calendar, volatility calculations | 2 |
tool | Trade calendar, utilities | 2 |
provider | Data provider abstractions | 12 |
§MSRV
Rust 1.85 (edition 2024)
Re-exports§
pub use market::detect_market;pub use market::normalize_hk_symbol;pub use types::*;
Modules§
- bank
- Banking regulatory data.
- bond
- Bond data: government, convertible, corporate, spot, buyback, CBond indices, ChinaMoney yields, Sina/THS sources, SSE summaries, CNINFO issuance, NAFMII, and Eastmoney rates.
- cal
- Realized volatility calculations.
- commodity
- Commodity data: energy (oil, carbon), spot prices.
- crypto
- Cryptocurrency spot price data.
- economy
- Economy-related alternative data: AMAC fund, air quality, auto sales, box office, NLP sentiment, articles, events, fortune, other.
- forex
- Forex rate data: Bank of China, Sina, Eastmoney, FX, currency.
- fund
- Fund data: ETF, open-end, money market, graded, LOF, Xueqiu, QDII, plus ranking, portfolio, rating, scale, report, announcement, AUM, etc.
- futures
- Futures data: exchanges, realtime, historical, derivatives.
- index
- Index data: A-share, HK, global, Shenwan, CNIndex, CX, QVIX, and more.
- macro_
data - Macro-economic data: China, US, Euro, UK, and global indicators, rates.
- market
- Market detection and symbol normalization utilities.
- news
- News search and aggregation.
- option
- Option data — comprehensive option market data from multiple sources.
- provider
- reits
- REITs data.
- spot
- Spot market data: Shanghai Gold Exchange, hog prices, QH commodity prices.
- stock
- Stock data: A-share, HK, US equities from multiple providers.
- tool
- Utility tools.
- types
- Shared types used across all modules.
Structs§
- AkShare
Client - AkShare Rust client — 100% pure Rust, no Python/JS/FFI.
- AkShare
Client Builder - Error