Get trading hours for a time range
https://quant-ws.prod.thinkalpha.io/markets/{marketIdentifierCode}/trading-hoursReturns the trading phases of a market that overlap a time range: each phase as a phaseType, a status and a half-open interval. Phases are returned whole (with their own full start and end, not clipped to the range), and gaps between phases and at the range edges are normally bridged with Closed phases.
The range is given by start (inclusive) and end (exclusive) instants. Ranges may cross calendar quarters, and there is no current limit on how wide a range you can request. The market's timezone is returned so you can interpret the phase times; alwaysClosedDays lists the weekdays the calendar never opens. If the calendar has no phase within 7 days before or after the range, schedules comes back empty.
The response includes an ETag reflecting the current version of the stored market data and the running build. Send it back as If-None-Match only on later requests for the same MIC, start and end: if the data has not changed the API responds 304 Not Modified with no body. The ETag does not vary with the MIC or the range, so it indicates that the market data changed, not that this specific response did. Omit it when the MIC or the range changes, or you can receive 304 for hours you did not fetch.
To check only which days in a range are open or closed without the per-phase detail, use GET /markets/{marketIdentifierCode}/days-status.
- Authentication
- Bearer token or Client credentials (HTTP Basic)
Path parameters
- marketIdentifierCode string required
The ISO 10383 market identifier code (MIC) of the market. For a set of known US and Canadian MICs the shared `XNYS` calendar is used; any other MIC is looked up directly.
Query parameters
- start string<date-time> required
Inclusive start of the range, an ISO 8601 instant with an offset.
- end string<date-time> required
Exclusive end of the range, an ISO 8601 instant with an offset. Must be on or after `start`.
Headers
- if-none-match string
The `ETag` from a previous trading-hours response for the same MIC, `start` and `end`. When it matches the current data version and build the API returns `304 Not Modified` with no body instead of resending the hours.
Responses
Multiday trading hours data.
- interval Interval required
The half-open `[start, end)` range the hours cover.
- timezone string required
The IANA time zone of the market.
- alwaysClosedDays DayOfWeek[] required
Weekdays the calendar never opens.
- SpecificTradingSchedule[] required
The phases overlapping the interval, in start order; gaps are normally bridged with `Closed` phases, and the array is empty when the calendar has no phase within 7 days of the range.