# Market Hours API – Holidays & Early-Close Days

> Market Hours API – Holidays & Early-Close Days is a paid API for AI agents from market-hours-api.onrender.com, paid per call via x402, $0.02/call, status unknown (last checked 2026-10-28).

Returns the list of closed weekdays (public holidays) and early-close days for a specified stock exchange or futures market within a given date range.

## Facts

- Endpoint: GET https://market-hours-api.onrender.com/v1/holidays?utm_source=zero.xyz
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-28
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/market-hours-api-holidays-early-close-days-41f374d4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_W2gbTBNxIl6fyfIRA3ZKi

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability market-hours-api-holidays-early-close-days-41f374d4
```

Example prompt: Can you pull all the trading holidays and early-close days for NYSE (XNYS) from January 1, 2025 to December 31, 2025 so I know which weekdays the market will be closed or closing early?

## When to prefer this

Use this endpoint when you need a definitive, machine-readable list of non-trading weekdays (holidays) and early-close days for a specific supported exchange or futures market, particularly for automating trading logic, scheduling jobs around market closures, or building financial calendars. It covers a curated set of major global markets (US, UK, German, Swiss, Japanese, Hong Kong, Chinese, Australian, and key futures venues) and is ideal when you need forward-looking or historical holiday data across up to two years.

## Known failure modes

- Invalid market code returns an error or empty result — only supported codes (XNYS, XNAS, XLON, XETR, XSWX, XTKS, XHKG, XSHG, XASX, CME_EQUITY, EUREX_INDEX) are accepted
- Date range exceeding two years may be rejected or return partial results
- Malformed date format (not YYYY-MM-DD) causes a validation error
- Start date after end date returns an error
- Payment failure (x402) prevents the response from being returned
- Network timeout from the Render-hosted service during high load

## How this service works

Returns closed weekdays (holidays) and early-close days of a stock exchange or futures market within a date range of up to two years.

## Output

A structured list of dates within the requested range on which the specified market is either fully closed (holidays falling on weekdays) or closes early, along with relevant metadata such as the market code and date details for each affected day.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "market",
      "start",
      "end"
     ],
     "properties": {
      "end": {
       "type": "string",
       "description": "End date YYYY-MM-DD"
      },
      "start": {
       "type": "string",
       "description": "Start date YYYY-MM-DD"
      },
      "market": {
       "type": "string",
       "description": "Market code: XNYS, XNAS, XLON, XETR, XSWX, XTKS, XHKG, XSHG, XASX, CME_EQUITY, EUREX_INDEX"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/market-hours-api-holidays-early-close-days-41f374d4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market-hours-api.onrender.com](https://www.zero.xyz/host/market-hours-api.onrender.com/llms.txt)
