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_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 integerSample Response
json
[
{"date": 20260403, "is_open": 1, "open_time": 34200000, "close_time": 57600000}
]
is_open=1means the market is open.open_timeandclose_timeare 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_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.