# Market Hours API
> Live trading hours and open/closed status for the world's major stock exchanges, computed on demand from the current time in each exchange's own time zone — no key, nothing cached. Find whether one exchange is trading right now, its local time, regular hours, lunch break and the minutes until it next opens or closes; get the live status of every covered exchange; or list only the exchanges trading right now. Daylight-saving is handled automatically. A market-clock layer — distinct from FX-session and exchange-registry tools: for 17 stock exchanges (NYSE, Nasdaq, LSE, Euronext, Xetra, TSE, HKEX, SSE and more) it answers "is this market open and when does it change?". Note: public holidays are not accounted for.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/markethours-api/..."
```

## Pricing
- **Free** (Free) — 5,650 calls/Mo, 3 req/s
- **Starter** ($6/Mo) — 125,000 calls/Mo, 12 req/s
- **Pro** ($16/Mo) — 590,000 calls/Mo, 30 req/s
- **Business** ($39/Mo) — 3,480,000 calls/Mo, 60 req/s

## Endpoints

### Market Hours

#### `GET /v1/exchanges` — Live status of every covered exchange

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/markethours-api/v1/exchanges"
```

**Response:**
```json
{
    "data": {
        "count": 17,
        "source": "MARKETHOURS",
        "open_now": 9,
        "exchanges": [
            {
                "code": "NYSE",
                "name": "New York Stock Exchange",
                "status": "pre_market",
                "country": "US",
                "is_open": false,
                "timezone": "America/New_York",
                "local_time": "03:49",
                "lunch_break": null,
                "local_weekday": "Thursday",
                "regular_hours": "09:30-16:00 (America/New_York)",
                "minutes_until_open": 341,
                "minutes_until_close": null
            },
            {
                "code": "NASDAQ",
                "name": "Nasdaq",
                "status": "pre_market",
                "country": "US",
                "is_open": false,
                "timezone": "America/New_York",
                "local_time": "03:49",
                "lunch_break": null,
                "local_weekday": "Thursday",
                "regular_hours": "09:30-16:00 (America/New_York)",
                "minutes_until_open": 341,
                "minutes_until_close": null
            },
            {
                "code": "TSX",
                "name": "Toronto Stock Exchange",
                "status": "pre_market",
                "country": "CA",
                "is_open": false,
                "timezone": "America/Toronto",
                "local_time": "03:49",
                "lunch_brea
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/meta` — Service metadata and endpoint list

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/markethours-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "note": "Public holidays are not accounted for — regular weekday hours only. 17 exchanges covered.",
        "source": "Computed in-process from current UTC time and each exchange's IANA time zone (no upstream)",
        "service": "markethours-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/open": "Only the exchanges open right now.",
            "GET /v1/status": "One exchange's live status + next open/close (exchange=NYSE).",
            "GET /v1/exchanges": "Live status of every covered exchange."
        },
        "description": "Live trading hours and open/closed status for the world's major stock exchanges, computed from the current time in each exchange's own time zone. The status endpoint tells you whether one exchange is trading right now, its local time, regular hours, lunch break and the minutes until it next opens or closes; the exchanges endpoint returns the live status of every covered exchange; the open endpoint lists only the exchanges trading right now. Daylight-saving is handled automatically. A market-clock layer, distinct from FX-session and exchange-registry tools.",
        "upstream_status": "ok",
        "exchanges_covered": [
            "NYSE",
            "NASDAQ",
            "TSX",
            "B3",
            "LSE",
            "EURONEXT",
            "XETRA",
            "SIX",
            "JSE",
            "TADAWUL",
            "NSE",
            "SSE",
            "
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/open` — Only the exchanges open right now

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/markethours-api/v1/open"
```

**Response:**
```json
{
    "data": {
        "count": 9,
        "source": "MARKETHOURS",
        "exchanges": [
            {
                "code": "LSE",
                "name": "London Stock Exchange",
                "status": "open",
                "country": "GB",
                "is_open": true,
                "timezone": "Europe/London",
                "local_time": "08:49",
                "lunch_break": null,
                "local_weekday": "Thursday",
                "regular_hours": "08:00-16:30 (Europe/London)",
                "minutes_until_open": null,
                "minutes_until_close": 461
            },
            {
                "code": "EURONEXT",
                "name": "Euronext Paris",
                "status": "open",
                "country": "FR",
                "is_open": true,
                "timezone": "Europe/Paris",
                "local_time": "09:49",
                "lunch_break": null,
                "local_weekday": "Thursday",
                "regular_hours": "09:00-17:30 (Europe/Paris)",
                "minutes_until_open": null,
                "minutes_until_close": 461
            },
            {
                "code": "XETRA",
                "name": "Deutsche Borse Xetra",
                "status": "open",
                "country": "DE",
                "is_open": true,
                "timezone": "Europe/Berlin",
                "local_time": "09:49",
                "lunch_break": null,
                "local_weekday": "Thursday",
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/status` — One exchange live status + next open/close

**Parameters:**
- `exchange` (query, required, string) — Exchange code (NYSE, NASDAQ, LSE, TSE, HKEX, ...) Example: `NYSE`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/markethours-api/v1/status?exchange=NYSE"
```

**Response:**
```json
{
    "data": {
        "code": "NYSE",
        "name": "New York Stock Exchange",
        "source": "MARKETHOURS",
        "status": "pre_market",
        "country": "US",
        "is_open": false,
        "timezone": "America/New_York",
        "local_time": "03:49",
        "lunch_break": null,
        "local_weekday": "Thursday",
        "regular_hours": "09:30-16:00 (America/New_York)",
        "minutes_until_open": 341,
        "minutes_until_close": null
    },
    "meta": {
        "timestamp": "2026-06-11T07:49:33.918Z",
        "request_id": "e3923660-2882-4674-8504-3875627f4604"
    },
    "status": "ok",
    "message": "Status retrieved successfully",
    "success": true
}
```


---
Marketplace page: https://www.oanor.com/api/markethours-api
OpenAPI spec: https://www.oanor.com/api/markethours-api/openapi.json
