# Calendar ## Get Clock **get** `/v1/clock` Returns the current server time in UTC. ### Returns - `data: ClockDetail` Current server time and market clock information - `clock: string` Current server time in UTC ### Example ```http curl https://api.clearstreet.com/v1/clock \ -H "Authorization: Bearer $API_KEY" ``` #### Response ```json { "data": { "clock": "2025-03-01T03:35:00.000000000Z" }, "error": null, "metadata": { "request_id": "1b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e" } } ``` ## Get Market Hours Calendar. **get** `/v1/calendars/market-hours` Retrieves comprehensive trading hours including pre-market, regular, and after-hours sessions. Returns market status, session times, and next session schedules. ### Query Parameters - `date: string` The date to query market hours for (YYYY-MM-DD). Defaults to today. - `market: optional MarketType` Market type to query (us_equities, us_options). If omitted, returns all markets. - `"us_equities"` - `"us_options"` ### Returns - `data: MarketHoursDetailList` - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: MarketType` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: TradingSessions` Next trading day's session schedules (without time_until fields) - `after_hours: optional SessionSchedule` After-hours session schedule, null if not available - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. - `pre_market: optional SessionSchedule` Pre-market session schedule, null if not available - `regular: optional SessionSchedule` Regular trading session schedule, null if holiday/weekend - `status: MarketStatus` Market status information - `day_type: DayType` The type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` - `is_open: boolean` Whether the market is currently open (real-time) - `current_session: optional MarketSessionType` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` - `timezone: string` IANA timezone identifier for the market - `today_sessions: TradingSessions` Trading session schedules for the requested date with time_until fields ### Example ```http curl https://api.clearstreet.com/v1/calendars/market-hours \ -H "Authorization: Bearer $API_KEY" ``` #### Response ```json { "data": [ { "current_time": "2025-11-28T11:00:00-05:00", "date": "2025-11-28", "market": "us_equities", "market_name": "US Equities", "next_sessions": { "after_hours": { "close": "2025-12-01T20:00:00-05:00", "open": "2025-12-01T16:00:00-05:00" }, "pre_market": { "close": "2025-12-01T09:30:00-05:00", "open": "2025-12-01T04:00:00-05:00" }, "regular": { "close": "2025-12-01T16:00:00-05:00", "open": "2025-12-01T09:30:00-05:00" } }, "status": { "current_session": "regular", "day_type": "EARLY_CLOSE", "is_open": true }, "timezone": "America/New_York", "today_sessions": { "pre_market": { "close": "2025-11-28T09:30:00-05:00", "open": "2025-11-28T04:00:00-05:00" }, "regular": { "close": "2025-11-28T13:00:00-05:00", "open": "2025-11-28T09:30:00-05:00", "time_until_close": "PT2H" } } } ], "error": null, "metadata": { "request_id": "3d4e5f6a-7b8c-9d0e-1f2a-3b4c5d6e7f8a" } } ``` ## Domain Types ### Clock Detail - `ClockDetail object { clock }` Current server time and market clock information - `clock: string` Current server time in UTC ### Day Type - `DayType = "TRADING_DAY" or "EARLY_CLOSE" or "HOLIDAY" or "WEEKEND"` Day type for market hours - indicates the type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` ### Market Hours Detail - `MarketHoursDetail object { current_time, date, market, 5 more }` Comprehensive market hours information for a specific market and date - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: MarketType` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: TradingSessions` Next trading day's session schedules (without time_until fields) - `after_hours: optional SessionSchedule` After-hours session schedule, null if not available - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. - `pre_market: optional SessionSchedule` Pre-market session schedule, null if not available - `regular: optional SessionSchedule` Regular trading session schedule, null if holiday/weekend - `status: MarketStatus` Market status information - `day_type: DayType` The type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` - `is_open: boolean` Whether the market is currently open (real-time) - `current_session: optional MarketSessionType` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` - `timezone: string` IANA timezone identifier for the market - `today_sessions: TradingSessions` Trading session schedules for the requested date with time_until fields ### Market Hours Detail List - `MarketHoursDetailList = array of MarketHoursDetail` - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: MarketType` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: TradingSessions` Next trading day's session schedules (without time_until fields) - `after_hours: optional SessionSchedule` After-hours session schedule, null if not available - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. - `pre_market: optional SessionSchedule` Pre-market session schedule, null if not available - `regular: optional SessionSchedule` Regular trading session schedule, null if holiday/weekend - `status: MarketStatus` Market status information - `day_type: DayType` The type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` - `is_open: boolean` Whether the market is currently open (real-time) - `current_session: optional MarketSessionType` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` - `timezone: string` IANA timezone identifier for the market - `today_sessions: TradingSessions` Trading session schedules for the requested date with time_until fields ### Market Session Type - `MarketSessionType = "pre_market" or "regular" or "after_hours"` Session type for market hours - `"pre_market"` - `"regular"` - `"after_hours"` ### Market Status - `MarketStatus object { day_type, is_open, current_session }` Market status information - `day_type: DayType` The type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` - `is_open: boolean` Whether the market is currently open (real-time) - `current_session: optional MarketSessionType` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` ### Market Type - `MarketType = "us_equities" or "us_options"` Market type for market hours calendar endpoint - `"us_equities"` - `"us_options"` ### Session Schedule - `SessionSchedule object { close, open, time_until_close, time_until_open }` Session schedule with open and close timestamps - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. ### Trading Sessions - `TradingSessions object { after_hours, pre_market, regular }` Trading sessions for a market day with full timestamps - `after_hours: optional SessionSchedule` After-hours session schedule, null if not available - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. - `pre_market: optional SessionSchedule` Pre-market session schedule, null if not available - `regular: optional SessionSchedule` Regular trading session schedule, null if holiday/weekend ### Calendar Get Clock Response - `CalendarGetClockResponse = BaseResponse` - `data: ClockDetail` Current server time and market clock information - `clock: string` Current server time in UTC ### Calendar Get Market Hours Calendar Response - `CalendarGetMarketHoursCalendarResponse = BaseResponse` - `data: MarketHoursDetailList` - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: MarketType` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: TradingSessions` Next trading day's session schedules (without time_until fields) - `after_hours: optional SessionSchedule` After-hours session schedule, null if not available - `close: string` Session close timestamp with timezone offset - `open: string` Session open timestamp with timezone offset - `time_until_close: optional string` ISO 8601 duration until session closes. Null if session is not currently open. - `time_until_open: optional string` ISO 8601 duration until session opens. Null if session has already started or closed. - `pre_market: optional SessionSchedule` Pre-market session schedule, null if not available - `regular: optional SessionSchedule` Regular trading session schedule, null if holiday/weekend - `status: MarketStatus` Market status information - `day_type: DayType` The type of trading day - `"TRADING_DAY"` - `"EARLY_CLOSE"` - `"HOLIDAY"` - `"WEEKEND"` - `is_open: boolean` Whether the market is currently open (real-time) - `current_session: optional MarketSessionType` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` - `timezone: string` IANA timezone identifier for the market - `today_sessions: TradingSessions` Trading session schedules for the requested date with time_until fields