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 days: Vec<CalendarDay> = tdx.calendar_open_today().await?;
python
result = tdx.calendar_open_today()
go
result, err := client.CalendarOpenToday()
if err != nil {
    log.Fatal(err)
}
cpp
auto today = client.calendar_open_today();

Parameters

None.

Response

Returns a Vec<CalendarDay> 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

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 GPL-3.0-or-later License.