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_openboolWhether the market is open today
open_timeu32Market open time (milliseconds from midnight ET)
close_timeu32Market close time (milliseconds from midnight ET)
early_closeboolWhether today is an early close day
dateu32Today's date as
YYYYMMDD integerNotes
- Call this at application startup to determine if live data will be available.
- On holidays,
is_openwill befalse. - On early close days (e.g. day before Thanksgiving),
close_timewill be earlier than the standard 4:00 PM ET. - Reflects NYSE trading hours only.