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 data = tdx.calendar_on_date("20260315").await?;
for t in &data {
    println!("date={} is_open={} open_time={} close_time={}",
        t.date, t.is_open, t.open_time, t.close_time);
}
python
data = tdx.calendar_on_date("20260315")
for t in data:
    print(f"date={t.date} is_open={t.is_open} "
          f"open_time={t.open_time} close_time={t.close_time}")
typescript
const data = tdx.calendarOnDate('20260315');
for (const t of data) {
    console.log(`date=${t.date} is_open=${t.is_open} open_time=${t.open_time} close_time=${t.close_time}`);
}
cpp
auto data = client.calendar_on_date("20260315");
for (const auto& t : data) {
    printf("date=%d is_open=%d open_time=%d close_time=%d\n",
        t.date, t.is_open, t.open_time, t.close_time);
}

Parameters

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

Response

Returns an array of CalendarDay records 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

Sample Response

json
[
  {"date": 20260402, "is_open": 1, "open_time": 34200000, "close_time": 57600000}
]

is_open=1 means the market was open on that date.

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 Apache-2.0 License.