Skip to content

calendar_on_date

FreeValueStandardPro

Retrieve the trading schedule for a specific date, including whether it is a regular trading day, early close, or holiday.

Code Example

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

Parameters

datestringrequired
Date in YYYYMMDD format (e.g. "20240315")

Response

Returns a Vec<CalendarDay> with calendar information:

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

  • Use this to check any historical or future date's trading status before requesting data.
  • Holidays return is_open: false.
  • Early close days (e.g. July 3rd, day after Thanksgiving) return a close_time earlier than the standard 4:00 PM ET.
  • Reflects NYSE trading hours only.

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