Skip to content
Start Trading

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.

ParametersExpand Collapse
query V1CalendarGetMarketHoursCalendarParams
Date param.Field[string]

The date to query market hours for (YYYY-MM-DD). Defaults to today.

Market param.Field[MarketType]Optional

Market type to query (us_equities, us_options). If omitted, returns all markets.

ReturnsExpand Collapse
type V1CalendarGetMarketHoursCalendarResponse struct{…}
CurrentTime Time

Current time in market timezone with offset

formatdate-time
Date Time

The date for which market hours are provided

formatdate
Market MarketType

Market type identifier

One of the following:
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 SessionScheduleOptional

After-hours session schedule, null if not available When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration
PreMarket SessionScheduleOptional

Pre-market session schedule, null if not available When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration
Regular SessionScheduleOptional

Regular trading session schedule, null if holiday/weekend When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration

Market status information

DayType DayType

The type of trading day

One of the following:
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 MarketSessionTypeOptional

Current session type if market is open, null if closed When a null/undefined value is observed, it indicates it does not apply.

One of the following:
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

AfterHours SessionScheduleOptional

After-hours session schedule, null if not available When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration
PreMarket SessionScheduleOptional

Pre-market session schedule, null if not available When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration
Regular SessionScheduleOptional

Regular trading session schedule, null if holiday/weekend When a null/undefined value is observed, it indicates it does not apply.

Close Time

Session close timestamp with timezone offset

formatdate-time
Open Time

Session open timestamp with timezone offset

formatdate-time
TimeUntilClose stringOptional

ISO 8601 duration until session closes. Null if session is not currently open. When a null/undefined value is observed, it indicates it does not apply.

formatduration
TimeUntilOpen stringOptional

ISO 8601 duration until session opens. Null if session has already started or closed. When a null/undefined value is observed, it indicates it does not apply.

formatduration

Get Market Hours Calendar.

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)
}
{
  "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"
  }
}
{
  "data": [
    {
      "current_time": "2025-12-25T10:00:00-05:00",
      "date": "2025-12-25",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-12-26T20:00:00-05:00",
          "open": "2025-12-26T16:00:00-05:00"
        },
        "pre_market": {
          "close": "2025-12-26T09:30:00-05:00",
          "open": "2025-12-26T04:00:00-05:00"
        },
        "regular": {
          "close": "2025-12-26T16:00:00-05:00",
          "open": "2025-12-26T09:30:00-05:00"
        }
      },
      "status": {
        "day_type": "HOLIDAY",
        "is_open": false
      },
      "timezone": "America/New_York",
      "today_sessions": {}
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "2c3d4e5f-6a7b-8c9d-0e1f-2a3b4c5d6e7f"
  }
}
{
  "data": [
    {
      "current_time": "2025-10-15T14:30:45-04:00",
      "date": "2025-10-15",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-10-16T20:00:00-04:00",
          "open": "2025-10-16T16:00:00-04:00"
        },
        "pre_market": {
          "close": "2025-10-16T09:30:00-04:00",
          "open": "2025-10-16T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-16T16:00:00-04:00",
          "open": "2025-10-16T09:30:00-04:00"
        }
      },
      "status": {
        "current_session": "regular",
        "day_type": "TRADING_DAY",
        "is_open": true
      },
      "timezone": "America/New_York",
      "today_sessions": {
        "after_hours": {
          "close": "2025-10-15T20:00:00-04:00",
          "open": "2025-10-15T16:00:00-04:00",
          "time_until_open": "PT1H29M15S"
        },
        "pre_market": {
          "close": "2025-10-15T09:30:00-04:00",
          "open": "2025-10-15T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-15T16:00:00-04:00",
          "open": "2025-10-15T09:30:00-04:00",
          "time_until_close": "PT1H29M15S"
        }
      }
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "1b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
  }
}
{
  "data": [
    {
      "current_time": "2025-10-18T12:00:00-04:00",
      "date": "2025-10-18",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-10-20T20:00:00-04:00",
          "open": "2025-10-20T16:00:00-04:00"
        },
        "pre_market": {
          "close": "2025-10-20T09:30:00-04:00",
          "open": "2025-10-20T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-20T16:00:00-04:00",
          "open": "2025-10-20T09:30:00-04:00"
        }
      },
      "status": {
        "day_type": "WEEKEND",
        "is_open": false
      },
      "timezone": "America/New_York",
      "today_sessions": {}
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b"
  }
}
Returns Examples
{
  "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"
  }
}
{
  "data": [
    {
      "current_time": "2025-12-25T10:00:00-05:00",
      "date": "2025-12-25",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-12-26T20:00:00-05:00",
          "open": "2025-12-26T16:00:00-05:00"
        },
        "pre_market": {
          "close": "2025-12-26T09:30:00-05:00",
          "open": "2025-12-26T04:00:00-05:00"
        },
        "regular": {
          "close": "2025-12-26T16:00:00-05:00",
          "open": "2025-12-26T09:30:00-05:00"
        }
      },
      "status": {
        "day_type": "HOLIDAY",
        "is_open": false
      },
      "timezone": "America/New_York",
      "today_sessions": {}
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "2c3d4e5f-6a7b-8c9d-0e1f-2a3b4c5d6e7f"
  }
}
{
  "data": [
    {
      "current_time": "2025-10-15T14:30:45-04:00",
      "date": "2025-10-15",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-10-16T20:00:00-04:00",
          "open": "2025-10-16T16:00:00-04:00"
        },
        "pre_market": {
          "close": "2025-10-16T09:30:00-04:00",
          "open": "2025-10-16T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-16T16:00:00-04:00",
          "open": "2025-10-16T09:30:00-04:00"
        }
      },
      "status": {
        "current_session": "regular",
        "day_type": "TRADING_DAY",
        "is_open": true
      },
      "timezone": "America/New_York",
      "today_sessions": {
        "after_hours": {
          "close": "2025-10-15T20:00:00-04:00",
          "open": "2025-10-15T16:00:00-04:00",
          "time_until_open": "PT1H29M15S"
        },
        "pre_market": {
          "close": "2025-10-15T09:30:00-04:00",
          "open": "2025-10-15T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-15T16:00:00-04:00",
          "open": "2025-10-15T09:30:00-04:00",
          "time_until_close": "PT1H29M15S"
        }
      }
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "1b2c3d4e-5f6a-7b8c-9d0e-1f2a3b4c5d6e"
  }
}
{
  "data": [
    {
      "current_time": "2025-10-18T12:00:00-04:00",
      "date": "2025-10-18",
      "market": "us_equities",
      "market_name": "US Equities",
      "next_sessions": {
        "after_hours": {
          "close": "2025-10-20T20:00:00-04:00",
          "open": "2025-10-20T16:00:00-04:00"
        },
        "pre_market": {
          "close": "2025-10-20T09:30:00-04:00",
          "open": "2025-10-20T04:00:00-04:00"
        },
        "regular": {
          "close": "2025-10-20T16:00:00-04:00",
          "open": "2025-10-20T09:30:00-04:00"
        }
      },
      "status": {
        "day_type": "WEEKEND",
        "is_open": false
      },
      "timezone": "America/New_York",
      "today_sessions": {}
    }
  ],
  "error": null,
  "metadata": {
    "request_id": "4e5f6a7b-8c9d-0e1f-2a3b-4c5d6e7f8a9b"
  }
}