## Get Market Hours Calendar. `client.V1.Calendar.GetMarketHoursCalendar(ctx, query) (*V1CalendarGetMarketHoursCalendarResponse, error)` **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 - `query V1CalendarGetMarketHoursCalendarParams` - `Date param.Field[string]` The date to query market hours for (YYYY-MM-DD). Defaults to today. - `Market param.Field[MarketType]` Market type to query (us_equities, us_options). If omitted, returns all markets. ### Returns - `type V1CalendarGetMarketHoursCalendarResponse struct{…}` - `Data MarketHoursDetailList` - `CurrentTime Time` Current time in market timezone with offset - `Date Time` The date for which market hours are provided - `Market MarketType` Market type identifier - `const MarketTypeUsEquities MarketType = "us_equities"` - `const MarketTypeUsOptions MarketType = "us_options"` - `MarketName string` Human-readable market name - `NextSessions TradingSessions` Next trading day's session schedules (without time_until fields) - `AfterHours SessionSchedule` After-hours session schedule, null if not available - `Close Time` Session close timestamp with timezone offset - `Open Time` Session open timestamp with timezone offset - `TimeUntilClose string` ISO 8601 duration until session closes. Null if session is not currently open. - `TimeUntilOpen string` ISO 8601 duration until session opens. Null if session has already started or closed. - `PreMarket SessionSchedule` Pre-market session schedule, null if not available - `Regular SessionSchedule` Regular trading session schedule, null if holiday/weekend - `Status MarketStatus` Market status information - `DayType DayType` The type of trading day - `const DayTypeTradingDay DayType = "TRADING_DAY"` - `const DayTypeEarlyClose DayType = "EARLY_CLOSE"` - `const DayTypeHoliday DayType = "HOLIDAY"` - `const DayTypeWeekend DayType = "WEEKEND"` - `IsOpen bool` Whether the market is currently open (real-time) - `CurrentSession MarketSessionType` Current session type if market is open, null if closed - `const MarketSessionTypePreMarket MarketSessionType = "pre_market"` - `const MarketSessionTypeRegular MarketSessionType = "regular"` - `const MarketSessionTypeAfterHours MarketSessionType = "after_hours"` - `Timezone string` IANA timezone identifier for the market - `TodaySessions TradingSessions` Trading session schedules for the requested date with time_until fields ### Example ```go package main import ( "context" "fmt" "github.com/clear-street/clear-street-go" "github.com/clear-street/clear-street-go/option" ) func main() { client := clearstreet.NewClient( option.WithAPIKey("My API Key"), ) response, err := client.V1.Calendar.GetMarketHoursCalendar(context.TODO(), clearstreet.V1CalendarGetMarketHoursCalendarParams{ Date: "date", }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response) } ``` #### 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" } } ```