pub struct Client { /* private fields */ }Expand description
Reusable async API client.
Implementations§
Source§impl Client
impl Client
Fetch auction snapshots for one or more A-share targets.
Fetch the short-term auction benchmark, optionally for a natural day.
Source§impl Client
impl Client
Sourcepub async fn calendar_trading_days(
&self,
) -> Result<Response<TradingDaysData>, Error>
pub async fn calendar_trading_days( &self, ) -> Result<Response<TradingDaysData>, Error>
Fetch the service’s recent A-share trading-day sequence.
Source§impl Client
impl Client
Sourcepub async fn corp_actions_adjustment_factors(
&self,
thscode: &AShareCode,
from: Option<NaturalDate>,
to: Option<NaturalDate>,
) -> Result<Response<AdjustmentFactorsData>, Error>
pub async fn corp_actions_adjustment_factors( &self, thscode: &AShareCode, from: Option<NaturalDate>, to: Option<NaturalDate>, ) -> Result<Response<AdjustmentFactorsData>, Error>
Fetch raw corporate action events used for price adjustment.
Source§impl Client
impl Client
Sourcepub async fn financials_income_statements(
&self,
thscode: &AShareCode,
period: FinancialPeriod,
range: FinancialRange,
) -> Result<Response<IncomeStatementsData>, Error>
pub async fn financials_income_statements( &self, thscode: &AShareCode, period: FinancialPeriod, range: FinancialRange, ) -> Result<Response<IncomeStatementsData>, Error>
Fetch income statements.
Sourcepub async fn financials_balance_sheets(
&self,
thscode: &AShareCode,
period: FinancialPeriod,
range: FinancialRange,
) -> Result<Response<BalanceSheetsData>, Error>
pub async fn financials_balance_sheets( &self, thscode: &AShareCode, period: FinancialPeriod, range: FinancialRange, ) -> Result<Response<BalanceSheetsData>, Error>
Fetch balance sheets.
Sourcepub async fn financials_cash_flow_statements(
&self,
thscode: &AShareCode,
period: FinancialPeriod,
range: FinancialRange,
) -> Result<Response<CashFlowStatementsData>, Error>
pub async fn financials_cash_flow_statements( &self, thscode: &AShareCode, period: FinancialPeriod, range: FinancialRange, ) -> Result<Response<CashFlowStatementsData>, Error>
Fetch cash-flow statements.
Sourcepub async fn financials_indicators(
&self,
thscode: &AShareCode,
report: &FinancialReport,
) -> Result<Response<FinancialIndicatorsData>, Error>
pub async fn financials_indicators( &self, thscode: &AShareCode, report: &FinancialReport, ) -> Result<Response<FinancialIndicatorsData>, Error>
Fetch the five groups of financial indicators for one report.
Source§impl Client
impl Client
Sourcepub async fn prices_snapshot(
&self,
selection: &PriceSnapshotSelection,
) -> Result<Response<PriceSnapshotData>, Error>
pub async fn prices_snapshot( &self, selection: &PriceSnapshotSelection, ) -> Result<Response<PriceSnapshotData>, Error>
Fetch current A-share price snapshots.
Sourcepub async fn prices_historical(
&self,
thscode: &AShareCode,
start: UnixMillis,
end: UnixMillis,
adjustment: Adjustment,
offset: u32,
) -> Result<Response<HistoricalData>, Error>
pub async fn prices_historical( &self, thscode: &AShareCode, start: UnixMillis, end: UnixMillis, adjustment: Adjustment, offset: u32, ) -> Result<Response<HistoricalData>, Error>
Fetch one target’s historical daily K-line data.
Source§impl Client
impl Client
Sourcepub async fn special_data_anomaly_analysis_list(
&self,
tag_codes: &[AnomalyTag],
) -> Result<Response<AnomalyData>, Error>
pub async fn special_data_anomaly_analysis_list( &self, tag_codes: &[AnomalyTag], ) -> Result<Response<AnomalyData>, Error>
Fetch today’s anomaly rows, optionally filtered with OR-combined tags.
Sourcepub async fn special_data_anomaly_analysis_stock(
&self,
thscodes: &[AShareCode],
) -> Result<Response<AnomalyData>, Error>
pub async fn special_data_anomaly_analysis_stock( &self, thscodes: &[AShareCode], ) -> Result<Response<AnomalyData>, Error>
Fetch today’s anomaly rows for up to 50 A-share targets.
Sourcepub async fn special_data_dragon_tiger_list(
&self,
board_type: DragonTigerBoard,
date: Option<NaturalDate>,
) -> Result<Response<DragonTigerData>, Error>
pub async fn special_data_dragon_tiger_list( &self, board_type: DragonTigerBoard, date: Option<NaturalDate>, ) -> Result<Response<DragonTigerData>, Error>
Fetch the dragon-tiger list.
Sourcepub async fn special_data_hot_stock_list(
&self,
period: HotListPeriod,
) -> Result<Response<HotStockData>, Error>
pub async fn special_data_hot_stock_list( &self, period: HotListPeriod, ) -> Result<Response<HotStockData>, Error>
Fetch the current hot-stock list.
Sourcepub async fn special_data_hot_stock_list_history(
&self,
date: NaturalDate,
) -> Result<Response<HotStockHistoryData>, Error>
pub async fn special_data_hot_stock_list_history( &self, date: NaturalDate, ) -> Result<Response<HotStockHistoryData>, Error>
Fetch a historical hot-stock ranking for one natural day.
Sourcepub async fn special_data_hot_stock_rank_trend(
&self,
thscode: &AShareCode,
start_date: NaturalDate,
end_date: NaturalDate,
) -> Result<Response<HotStockTrendData>, Error>
pub async fn special_data_hot_stock_rank_trend( &self, thscode: &AShareCode, start_date: NaturalDate, end_date: NaturalDate, ) -> Result<Response<HotStockTrendData>, Error>
Fetch one A-share target’s hot-rank trend.
Sourcepub async fn special_data_limit_up_pool(
&self,
date_ms: Option<ShanghaiDateMillis>,
page: Page,
sort_field: LimitUpSortField,
sort_dir: SortDirection,
) -> Result<Response<LimitUpData>, Error>
pub async fn special_data_limit_up_pool( &self, date_ms: Option<ShanghaiDateMillis>, page: Page, sort_field: LimitUpSortField, sort_dir: SortDirection, ) -> Result<Response<LimitUpData>, Error>
Fetch the limit-up pool.
Sourcepub async fn special_data_limit_down_pool(
&self,
date_ms: Option<ShanghaiDateMillis>,
page: Page,
sort_field: LimitDownSortField,
sort_dir: SortDirection,
) -> Result<Response<LimitDownData>, Error>
pub async fn special_data_limit_down_pool( &self, date_ms: Option<ShanghaiDateMillis>, page: Page, sort_field: LimitDownSortField, sort_dir: SortDirection, ) -> Result<Response<LimitDownData>, Error>
Fetch the limit-down pool.
Sourcepub async fn special_data_limit_break_pool(
&self,
date_ms: Option<ShanghaiDateMillis>,
page: Page,
sort_field: LimitBreakSortField,
sort_dir: SortDirection,
) -> Result<Response<LimitBreakData>, Error>
pub async fn special_data_limit_break_pool( &self, date_ms: Option<ShanghaiDateMillis>, page: Page, sort_field: LimitBreakSortField, sort_dir: SortDirection, ) -> Result<Response<LimitBreakData>, Error>
Fetch the limit-break pool.
Sourcepub async fn special_data_limit_up_ladder(
&self,
) -> Result<Response<LadderData>, Error>
pub async fn special_data_limit_up_ladder( &self, ) -> Result<Response<LadderData>, Error>
Fetch the fixed 30-trading-day limit-up ladder.
Sourcepub async fn special_data_skyrocket_list(
&self,
period: HotListPeriod,
) -> Result<Response<HotStockData>, Error>
pub async fn special_data_skyrocket_list( &self, period: HotListPeriod, ) -> Result<Response<HotStockData>, Error>
Fetch the current skyrocket ranking.
Source§impl Client
impl Client
Sourcepub async fn fund_companies_detail(
&self,
company_id: &CompanyId,
) -> Result<Response<FundCompanyData>, Error>
pub async fn fund_companies_detail( &self, company_id: &CompanyId, ) -> Result<Response<FundCompanyData>, Error>
Fetch fund company details.
Source§impl Client
impl Client
Sourcepub async fn fund_corporate_actions_dividends(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundDividendsData>, Error>
pub async fn fund_corporate_actions_dividends( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundDividendsData>, Error>
Fetch historical fund dividends.
Source§impl Client
impl Client
Sourcepub async fn fund_diagnostics_detail(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundDiagnosticsData>, Error>
pub async fn fund_diagnostics_detail( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundDiagnosticsData>, Error>
Fetch fund diagnostic dimensions.
Source§impl Client
impl Client
Sourcepub async fn fund_financials_indicators(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundFinancialIndicatorsData>, Error>
pub async fn fund_financials_indicators( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundFinancialIndicatorsData>, Error>
Fetch fund financial indicators.
Sourcepub async fn fund_financials_income_statements(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundIncomeStatementsData>, Error>
pub async fn fund_financials_income_statements( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundIncomeStatementsData>, Error>
Fetch fund income statements.
Sourcepub async fn fund_financials_balance_sheets(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundBalanceSheetsData>, Error>
pub async fn fund_financials_balance_sheets( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundBalanceSheetsData>, Error>
Fetch fund balance sheets.
Source§impl Client
impl Client
Sourcepub async fn fund_holders_detail(
&self,
fund_type: FundType,
thscode: &Thscode,
merge_scope: HolderMergeScope,
) -> Result<Response<FundHoldersData>, Error>
pub async fn fund_holders_detail( &self, fund_type: FundType, thscode: &Thscode, merge_scope: HolderMergeScope, ) -> Result<Response<FundHoldersData>, Error>
Fetch fund holder structure.
Sourcepub async fn fund_holders_top(
&self,
fund_type: FundType,
thscode: &Thscode,
limit: Option<u8>,
) -> Result<Response<FundTopHoldersData>, Error>
pub async fn fund_holders_top( &self, fund_type: FundType, thscode: &Thscode, limit: Option<u8>, ) -> Result<Response<FundTopHoldersData>, Error>
Fetch up to ten largest fund holders.
Source§impl Client
impl Client
Sourcepub async fn fund_managers_investment_style(
&self,
manager_id: &ManagerId,
) -> Result<Response<FundManagerStyleData>, Error>
pub async fn fund_managers_investment_style( &self, manager_id: &ManagerId, ) -> Result<Response<FundManagerStyleData>, Error>
Fetch a fund manager’s investment style.
Sourcepub async fn fund_managers_performance(
&self,
manager_id: &ManagerId,
range: ManagerPerformanceRange,
) -> Result<Response<FundManagerPerformanceData>, Error>
pub async fn fund_managers_performance( &self, manager_id: &ManagerId, range: ManagerPerformanceRange, ) -> Result<Response<FundManagerPerformanceData>, Error>
Fetch a fund manager’s performance series.
Sourcepub async fn fund_managers_experience(
&self,
manager_id: &ManagerId,
) -> Result<Response<FundManagerExperienceData>, Error>
pub async fn fund_managers_experience( &self, manager_id: &ManagerId, ) -> Result<Response<FundManagerExperienceData>, Error>
Fetch a fund manager’s professional experience.
Sourcepub async fn fund_managers_detail(
&self,
manager_id: &ManagerId,
) -> Result<Response<FundManagerDetailData>, Error>
pub async fn fund_managers_detail( &self, manager_id: &ManagerId, ) -> Result<Response<FundManagerDetailData>, Error>
Fetch a fund manager’s detailed profile.
Source§impl Client
impl Client
Sourcepub async fn fund_market_snapshot(
&self,
thscode: &Thscode,
) -> Result<Response<FundMarketSnapshotData>, Error>
pub async fn fund_market_snapshot( &self, thscode: &Thscode, ) -> Result<Response<FundMarketSnapshotData>, Error>
Fetch the latest exchange-traded fund snapshot.
Sourcepub async fn fund_market_historical(
&self,
thscode: &Thscode,
start: UnixMillis,
end: UnixMillis,
) -> Result<Response<FundMarketHistoricalData>, Error>
pub async fn fund_market_historical( &self, thscode: &Thscode, start: UnixMillis, end: UnixMillis, ) -> Result<Response<FundMarketHistoricalData>, Error>
Fetch exchange-traded fund historical daily prices.
Source§impl Client
impl Client
Sourcepub async fn fund_offerings_list(
&self,
status: OfferingStatus,
) -> Result<Response<FundOfferingsData>, Error>
pub async fn fund_offerings_list( &self, status: OfferingStatus, ) -> Result<Response<FundOfferingsData>, Error>
Fetch active or upcoming fund offerings.
Source§impl Client
impl Client
Fetch fund NAV series.
Sourcepub async fn fund_performance_returns(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundReturnsData>, Error>
pub async fn fund_performance_returns( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundReturnsData>, Error>
Fetch multi-range fund returns and peer rankings.
Sourcepub async fn fund_performance_indicators_historical(
&self,
fund_type: FundType,
thscode: &Thscode,
start: UnixMillis,
end: UnixMillis,
) -> Result<Response<FundIndicatorHistoryData>, Error>
pub async fn fund_performance_indicators_historical( &self, fund_type: FundType, thscode: &Thscode, start: UnixMillis, end: UnixMillis, ) -> Result<Response<FundIndicatorHistoryData>, Error>
Fetch historical fund performance indicators.
Sourcepub async fn fund_performance_drawdowns(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundDrawdownsData>, Error>
pub async fn fund_performance_drawdowns( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundDrawdownsData>, Error>
Fetch standard-period maximum drawdowns.
Source§impl Client
impl Client
Sourcepub async fn fund_portfolio_holdings(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundHoldingsData>, Error>
pub async fn fund_portfolio_holdings( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundHoldingsData>, Error>
Fetch periodically disclosed fund holdings and summary ratios.
Sourcepub async fn fund_portfolio_stock_history(
&self,
fund_type: FundType,
thscode: &Thscode,
report_type: &ReportType,
end_date: NaturalDate,
) -> Result<Response<FundPortfolioHistoryData>, Error>
pub async fn fund_portfolio_stock_history( &self, fund_type: FundType, thscode: &Thscode, report_type: &ReportType, end_date: NaturalDate, ) -> Result<Response<FundPortfolioHistoryData>, Error>
Fetch historical disclosed stock holdings.
Sourcepub async fn fund_portfolio_bond_history(
&self,
fund_type: FundType,
thscode: &Thscode,
report_type: &ReportType,
end_date: NaturalDate,
) -> Result<Response<FundPortfolioHistoryData>, Error>
pub async fn fund_portfolio_bond_history( &self, fund_type: FundType, thscode: &Thscode, report_type: &ReportType, end_date: NaturalDate, ) -> Result<Response<FundPortfolioHistoryData>, Error>
Fetch historical disclosed bond holdings.
Sourcepub async fn fund_portfolio_stock_report_dates(
&self,
fund_type: FundType,
thscode: &Thscode,
report_type: Option<&ReportType>,
) -> Result<Response<FundReportDatesData>, Error>
pub async fn fund_portfolio_stock_report_dates( &self, fund_type: FundType, thscode: &Thscode, report_type: Option<&ReportType>, ) -> Result<Response<FundReportDatesData>, Error>
Fetch available stock-holding report dates.
Sourcepub async fn fund_portfolio_bond_report_dates(
&self,
fund_type: FundType,
thscode: &Thscode,
report_type: Option<&ReportType>,
) -> Result<Response<FundReportDatesData>, Error>
pub async fn fund_portfolio_bond_report_dates( &self, fund_type: FundType, thscode: &Thscode, report_type: Option<&ReportType>, ) -> Result<Response<FundReportDatesData>, Error>
Fetch available bond-holding report dates.
Sourcepub async fn fund_portfolio_asset_allocation(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundAssetAllocationData>, Error>
pub async fn fund_portfolio_asset_allocation( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundAssetAllocationData>, Error>
Fetch fund asset allocation.
Sourcepub async fn fund_portfolio_industry_allocation(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundIndustryAllocationData>, Error>
pub async fn fund_portfolio_industry_allocation( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundIndustryAllocationData>, Error>
Fetch fund industry allocation.
Source§impl Client
impl Client
Sourcepub async fn fund_profile_detail(
&self,
fund_type: FundType,
thscode: &Thscode,
) -> Result<Response<FundProfileData>, Error>
pub async fn fund_profile_detail( &self, fund_type: FundType, thscode: &Thscode, ) -> Result<Response<FundProfileData>, Error>
Fetch fund basic profile details.
Source§impl Client
impl Client
Sourcepub async fn index_catalog_ths_index_list(
&self,
tag: IndexTag,
) -> Result<Response<IndexCatalogData>, Error>
pub async fn index_catalog_ths_index_list( &self, tag: IndexTag, ) -> Result<Response<IndexCatalogData>, Error>
List Tonghuashun indices for a catalog tag.
Sourcepub async fn index_constituents_ths_stock_list(
&self,
thscode: &Thscode,
) -> Result<Response<IndexConstituentsData>, Error>
pub async fn index_constituents_ths_stock_list( &self, thscode: &Thscode, ) -> Result<Response<IndexConstituentsData>, Error>
Fetch the current constituent list of one index.
Sourcepub async fn index_prices_snapshot(
&self,
thscodes: &[Thscode],
) -> Result<Response<PriceSnapshotData>, Error>
pub async fn index_prices_snapshot( &self, thscodes: &[Thscode], ) -> Result<Response<PriceSnapshotData>, Error>
Fetch snapshots for one or more exchange or Tonghuashun indices.
Sourcepub async fn index_prices_historical(
&self,
thscode: &Thscode,
start: UnixMillis,
end: UnixMillis,
) -> Result<Response<IndexHistoricalData>, Error>
pub async fn index_prices_historical( &self, thscode: &Thscode, start: UnixMillis, end: UnixMillis, ) -> Result<Response<IndexHistoricalData>, Error>
Fetch historical daily K-lines for one index.
Source§impl Client
impl Client
Sourcepub async fn market_dump_daily_k(
&self,
) -> Result<Response<MarketDumpUrl>, Error>
pub async fn market_dump_daily_k( &self, ) -> Result<Response<MarketDumpUrl>, Error>
Sign a URL for the full ten-year daily K-line dump.
Sourcepub async fn market_dump_daily_k_10d(
&self,
) -> Result<Response<MarketDumpUrl>, Error>
pub async fn market_dump_daily_k_10d( &self, ) -> Result<Response<MarketDumpUrl>, Error>
Sign a URL for the latest ten trading days of daily K-lines.
Sourcepub async fn market_dump_adjustment_factors(
&self,
) -> Result<Response<MarketDumpUrl>, Error>
pub async fn market_dump_adjustment_factors( &self, ) -> Result<Response<MarketDumpUrl>, Error>
Sign a URL for the full corporate-action event dump.
Source§impl Client
impl Client
Sourcepub async fn tickers_search(
&self,
request: &TickerSearchRequest,
) -> Result<Response<TickerData>, Error>
pub async fn tickers_search( &self, request: &TickerSearchRequest, ) -> Result<Response<TickerData>, Error>
Search targets by complete code, local ticker, or name.
Source§impl Client
impl Client
Sourcepub async fn tickers_list(
&self,
request: &TickerListRequest,
) -> Result<Response<TickerData>, Error>
pub async fn tickers_list( &self, request: &TickerListRequest, ) -> Result<Response<TickerData>, Error>
Browse the normalized target code table.