fetch_market_hours
Returns the market hours for a given day. Hours are based on the exchange specified in the class’s ‘exchange’ attribute.
Syntax
Fields
Description
date(dt.date)
The date to get market hours for
def fetch_market_hours(self, date: dt.date) -> Dict[str, Any]: Returns
Returns a dictionary with the following keys and values:
is_open: Boolean indicating whether the market is open or closedopen_at: Time the market opens in UTC timezoneclose_at: Time the market closes in UTC timezone
Raises
- An
Exceptionis raised if there is an error fetching market hours.