# Calendar ## Get Clock `$ clear-street v1:calendar get-clock` **get** `/v1/clock` Returns the current server time in UTC. ### Returns - `V1CalendarGetClockResponse: BaseResponse` - `data: object { clock }` Current server time and market clock information - `clock: string` Current server time in UTC ### Example ```cli clear-street v1:calendar get-clock \ --api-key 'My 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. `$ clear-street v1:calendar 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. ### Parameters - `--date: string` The date to query market hours for (YYYY-MM-DD). Defaults to today. - `--market: optional "us_equities" or "us_options"` Market type to query (us_equities, us_options). If omitted, returns all markets. ### Returns - `V1CalendarGetMarketHoursCalendarResponse: BaseResponse` - `data: array of MarketHoursDetail` - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: "us_equities" or "us_options"` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: object { after_hours, pre_market, regular }` Next trading day's session schedules (without time_until fields) - `after_hours: optional object { close, open, time_until_close, time_until_open }` 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 object { close, open, time_until_close, time_until_open }` Pre-market 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. - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend - `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. - `status: object { day_type, is_open, current_session }` Market status information - `day_type: "TRADING_DAY" or "EARLY_CLOSE" or "HOLIDAY" or "WEEKEND"` 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 "pre_market" or "regular" or "after_hours"` 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: object { after_hours, pre_market, regular }` Trading session schedules for the requested date with time_until fields - `after_hours: optional object { close, open, time_until_close, time_until_open }` After-hours session schedule, null if not available - `pre_market: optional object { close, open, time_until_close, time_until_open }` Pre-market session schedule, null if not available - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend ### Example ```cli clear-street v1:calendar get-market-hours-calendar \ --api-key 'My API Key' \ --date date ``` #### 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 - `clock_detail: object { clock }` Current server time and market clock information - `clock: string` Current server time in UTC ### Day Type - `day_type: "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 - `market_hours_detail: 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: "us_equities" or "us_options"` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: object { after_hours, pre_market, regular }` Next trading day's session schedules (without time_until fields) - `after_hours: optional object { close, open, time_until_close, time_until_open }` 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 object { close, open, time_until_close, time_until_open }` Pre-market 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. - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend - `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. - `status: object { day_type, is_open, current_session }` Market status information - `day_type: "TRADING_DAY" or "EARLY_CLOSE" or "HOLIDAY" or "WEEKEND"` 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 "pre_market" or "regular" or "after_hours"` 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: object { after_hours, pre_market, regular }` Trading session schedules for the requested date with time_until fields - `after_hours: optional object { close, open, time_until_close, time_until_open }` After-hours session schedule, null if not available - `pre_market: optional object { close, open, time_until_close, time_until_open }` Pre-market session schedule, null if not available - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend ### Market Hours Detail List - `market_hours_detail_list: array of MarketHoursDetail` - `current_time: string` Current time in market timezone with offset - `date: string` The date for which market hours are provided - `market: "us_equities" or "us_options"` Market type identifier - `"us_equities"` - `"us_options"` - `market_name: string` Human-readable market name - `next_sessions: object { after_hours, pre_market, regular }` Next trading day's session schedules (without time_until fields) - `after_hours: optional object { close, open, time_until_close, time_until_open }` 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 object { close, open, time_until_close, time_until_open }` Pre-market 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. - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend - `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. - `status: object { day_type, is_open, current_session }` Market status information - `day_type: "TRADING_DAY" or "EARLY_CLOSE" or "HOLIDAY" or "WEEKEND"` 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 "pre_market" or "regular" or "after_hours"` 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: object { after_hours, pre_market, regular }` Trading session schedules for the requested date with time_until fields - `after_hours: optional object { close, open, time_until_close, time_until_open }` After-hours session schedule, null if not available - `pre_market: optional object { close, open, time_until_close, time_until_open }` Pre-market session schedule, null if not available - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend ### Market Session Type - `market_session_type: "pre_market" or "regular" or "after_hours"` Session type for market hours - `"pre_market"` - `"regular"` - `"after_hours"` ### Market Status - `market_status: object { day_type, is_open, current_session }` Market status information - `day_type: "TRADING_DAY" or "EARLY_CLOSE" or "HOLIDAY" or "WEEKEND"` 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 "pre_market" or "regular" or "after_hours"` Current session type if market is open, null if closed - `"pre_market"` - `"regular"` - `"after_hours"` ### Market Type - `market_type: "us_equities" or "us_options"` Market type for market hours calendar endpoint - `"us_equities"` - `"us_options"` ### Session Schedule - `session_schedule: 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 - `trading_sessions: object { after_hours, pre_market, regular }` Trading sessions for a market day with full timestamps - `after_hours: optional object { close, open, time_until_close, time_until_open }` 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 object { close, open, time_until_close, time_until_open }` Pre-market 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. - `regular: optional object { close, open, time_until_close, time_until_open }` Regular trading session schedule, null if holiday/weekend - `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.