Skip to content

calendar_open_today

FreeValueStandardPro

Check whether the market is open today and retrieve the current day's trading schedule, including open/close times and any early close indicators.

Code Example

rust
let data = tdx.calendar_open_today().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_open_today()
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.calendarOpenToday();
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_open_today();
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

None.

Response

Returns an array of CalendarDay records with market status fields:

is_openbool
Whether the market is open today
open_timeu32
Market open time (milliseconds from midnight ET)
close_timeu32
Market close time (milliseconds from midnight ET)
early_closebool
Whether today is an early close day
dateu32
Today's date as YYYYMMDD integer

Sample Response

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

is_open=1 means the market is open. open_time and close_time are milliseconds from midnight ET (34200000 = 9:30 AM, 57600000 = 4:00 PM).

Notes

  • Call this at application startup to determine if live data will be available.
  • On holidays, is_open will be false.
  • On early close days (e.g. day before Thanksgiving), close_time will be earlier than the standard 4:00 PM ET.
  • Reflects NYSE trading hours only.

Released under the Apache-2.0 License.