Skip to main content

financial_api/a_share/
calendar.rs

1use crate::endpoints;
2use crate::{Client, Error, Response, TradingDaysData};
3
4impl Client {
5    /// 获取服务提供的近期 A 股交易日序列。
6    ///
7    /// # 示例
8    #[doc = concat!(
9        "```no_run\n",
10        include_str!("../../examples/calendar_trading_days.rs"),
11        "\n```"
12    )]
13    pub async fn calendar_trading_days(&self) -> Result<Response<TradingDaysData>, Error> {
14        self.get(endpoints::TRADING_DAYS, &[] as &[(&str, &str)])
15            .await
16    }
17}