> From TickerLayer docs, Market Status: https://tickerlayer.com/docs/market-status#markets-sessions
> REST base URL https://api.tickerlayer.com, API key in the `x-api-key` header. WebSocket wss://stream.tickerlayer.com?apiKey=YOUR_API_KEY. Full API reference: https://tickerlayer.com/llms-full.txt

## Trading sessions

**Endpoint:** `GET /markets/sessions`

Ordered session windows for a given market and local date. Where modeled, equities may include pre-market, primary, and post-market phases; simpler calendars may return a single primary window, and a market with an intraday break (TH) returns one window per trading block. Each window carries `status`: `open` for the primary block, `available` for extended hours, and `closed` for every window on a weekend or holiday, so the list still describes the shape of a normal day.

### Query parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `market` | string | Optional if asset/symbol resolves a calendar. |
| `asset` | string | Optional. Used with symbol to resolve the calendar. |
| `symbol` | string | Optional. Used with asset to resolve the calendar. |
| `date` | string | Optional. yyyy-mm-dd in that market’s context; defaults to “today” in the market timezone. |

### Request

```bash
curl -sS "https://api.tickerlayer.com/markets/sessions?market=US&date=2026-05-04" \
  -H "x-api-key: YOUR_API_KEY"
```

```javascript
const params = new URLSearchParams({ market: "US", date: "2026-05-04" });
const res = await fetch(`https://api.tickerlayer.com/markets/sessions?${params}`, {
  headers: { "x-api-key": "YOUR_API_KEY" },
});
const data = await res.json();
```

```python
import requests

res = requests.get(
    "https://api.tickerlayer.com/markets/sessions",
    params={"market": "US", "date": "2026-05-04"},
    headers={"x-api-key": "YOUR_API_KEY"},
)
data = res.json()
```

### Response

```json
{
  "market": "US",
  "date": "2026-05-04",
  "timezone": "America/New_York",
  "is_open": true,
  "holiday": null,
  "sessions": [
    {
      "phase": "pre_market",
      "status": "available",
      "start": "2026-05-04T08:00:00.000Z",
      "end": "2026-05-04T13:30:00.000Z"
    },
    {
      "phase": "primary",
      "status": "open",
      "start": "2026-05-04T13:30:00.000Z",
      "end": "2026-05-04T20:00:00.000Z"
    },
    {
      "phase": "post_market",
      "status": "available",
      "start": "2026-05-04T20:00:00.000Z",
      "end": "2026-05-05T00:00:00.000Z"
    }
  ],
  "meta": { "calendar_version": "v1-static-2026-2027" }
}
```

### Notes

The `holiday` key is always present on this route: an object when a holiday row applies to that local date, and `null` otherwise. On a day the market does not open, the windows are still returned with their scheduled times, each carrying `"status": "closed"`. A trading day on shifted hours, such as Korea's late session on 19 November 2026 (10:00 to 16:30 local), is not a holiday: its primary window carries the shifted times, and status, `next_open`, `next_close` and the status `session` block follow them.
