Skip to content

calendar_year

FreeValueStandardPro

Retrieve the complete trading calendar for an entire year, including every trading day, holiday, and early close day.

Code Example

rust
let days: Vec<CalendarDay> = tdx.calendar_year("2024").await?;
python
result = tdx.calendar_year("2024")
go
result, err := client.CalendarYear("2024")
if err != nil {
    log.Fatal(err)
}
cpp
auto year_info = client.calendar_year("2024");

Parameters

yearstringrequired
4-digit year (e.g. "2024")

Response

Returns a Vec<CalendarDay> with calendar info for every trading day in the year:

is_openbool
Whether the market is open on this date
open_timeu32
Market open time (milliseconds from midnight ET)
close_timeu32
Market close time (milliseconds from midnight ET)
early_closebool
Whether this is an early close day
dateu32
Date as YYYYMMDD integer

Notes

  • Returns entries for all calendar days in the year, not just trading days. Non-trading days have is_open: false.
  • Useful for building local trading calendars and scheduling data collection.
  • Future years may have incomplete data if the exchange has not yet published the full calendar.
  • Reflects NYSE trading hours only.

Released under the GPL-3.0-or-later License.