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
yearstringrequired4-digit year (e.g.
"2024")Response
Returns a Vec<CalendarDay> with calendar info for every trading day in the year:
is_openboolWhether the market is open on this date
open_timeu32Market open time (milliseconds from midnight ET)
close_timeu32Market close time (milliseconds from midnight ET)
early_closeboolWhether this is an early close day
dateu32Date as
YYYYMMDD integerNotes
- 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.