Get_calendar() misleading result

What is the expected return of the method “get_calendar()”
when the input date is actually a recognised holiday by an exchange such NYSE?

For instance, the NYSE closes earlier at 13:00 on 2023-07-03
due to the independence day, next day.

Therefore, I expect a return which tells that the market is closed
if I give the input date as ‘2023-07-04’.

Nevertheless, the return that I see is just the normal opening hours (09:30 ~16:00).
Am I missing something?

‘’’ [Check Market Hours] Check Market Hours - Documentation | Alpaca
[NYSE Holidays] NYSE: Holidays and Trading Hours

api = tradeapi.REST(API_KEY, SECRET_KEY, END_POINT, api_version = ‘v2’)

# The NYSE closes at 13:00 on 2023-07-03 due to the independence day on 4th.
date = ‘2023-07-03’
calendar = api.get_calendar(start = date, end = date)[0]
print(‘The market opened at {} and closed at {} on {}.’.format(,

I’ve checked it right now and this endpoint returns the correct values for the 2023-07-03 date.