# Date Math – Stock Exchange Market Calendar

> Date Math – Stock Exchange Market Calendar is a paid API for AI agents from date-math.datemath.workers.dev, paid per call via x402, $0.001/call, status unknown (last checked 2026-11-21).

Returns real-time and scheduled market status (open/closed, session times, holidays, early closes, next/previous trading day, settlement date) for NYSE, Nasdaq, LSE, and JPX exchanges.

## Facts

- Endpoint: POST https://date-math.datemath.workers.dev/v1/market?utm_source=zero.xyz
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-11-21
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/date-math-stock-exchange-market-calendar-4625d16a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D-FBYTJJtP1LFMmtRmOg1

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 date-math-stock-exchange-market-calendar-4625d16a -d '<json body>'
```

Example prompt: Is the NYSE open right now, and if not, when does it next open? Also tell me the settlement date if I place a trade today.

## When to prefer this

Use this endpoint when you need authoritative, exchange-specific market hours data including holiday schedules, early closes, session phases, and settlement dates for NYSE, Nasdaq, LSE, or JPX. It is purpose-built for trading agents, order timing logic, and settlement calculations — prefer it over generic business-day APIs that do not understand exchange-specific rules like Columbus Day bank holidays or the JPX lunch break.

## Known failure modes

- Unsupported exchange code returns an error or empty response
- Invalid date format (not YYYY-MM-DD) causes a validation error
- Unscheduled closures (e.g. national mourning days) may not be reflected until officially announced
- list_year outside 2000-2050 range is rejected
- Missing or malformed ISO 8601 'at' field falls back to server current time, which may differ from user's intent

## How this service works

Date Math: Stock exchange calendar for NYSE/Nasdaq, London (LSE) and Tokyo (JPX): is the market open now, today's session (early closes, lunch break), next open and close, holidays, previous/next trading day, and the trade settlement date (T+1/T+2). Use for trading agents, order timing and settlement.

## Output

A JSON object with the exchange name, current market phase (open/pre/post/closed), session open and close times in both local and UTC, whether today is a trading day, any holiday or early-close reason, next and previous trading days, and the settlement date (T+1 for US, T+2 for others). Optionally includes the full holiday/early-close calendar for a requested year.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "at": {
   "type": "string",
   "description": "Instant for the open/closed status: ISO 8601 with offset (default: now)"
  },
  "date": {
   "type": "string",
   "example": "2026-11-07",
   "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
  },
  "exchange": {
   "type": "string",
   "example": "NYSE",
   "description": "XNYS or NYSE, XNAS or NASDAQ, XLON or LSE, XTKS or TSE/JPX"
  },
  "list_year": {
   "type": "integer",
   "maximum": 2050,
   "minimum": 2000,
   "description": "Also list that year's holidays and early closes"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "date": "2026-11-27",
  "name": "New York Stock Exchange (same holidays as Nasdaq)",
  "note": "Regular sessions only (no pre/after-hours). Unscheduled closures (e.g. national mourning days) are added when announced.",
  "reason": null,
  "status": {
   "at": "2026-11-27T17:00:00Z",
   "local": "2026-11-27T12:00:00-05:00",
   "phase": "open",
   "is_open": true,
   "next_open": "2026-11-30T14:30:00Z",
   "next_close": "2026-11-27T18:00:00Z"
  },
  "holiday": null,
  "session": {
   "open": "2026-11-27T09:30:00-05:00",
   "break": null,
   "close": "2026-11-27T13:00:00-05:00",
   "open_utc": "2026-11-27T14:30:00Z",
   "close_utc": "2026-11-27T18:00:00Z"
  },
  "weekday": "Friday",
  "calendar": null,
  "exchange": "XNYS",
  "timezone": "America/New_York",
  "settlement": {
   "note": "US equities settle T+1 (since 2024-05-28); settlement also skips Columbus Day and Veterans Day, when markets are open but banks are closed.",
   "cycle": "T+1",
   "settlement_date": "2026-11-30"
  },
  "early_close": "Day after Thanksgiving",
  "is_trading_day": true,
  "next_trading_day": "2026-11-30",
  "previous_trading_day": "2026-11-25"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/date-math-stock-exchange-market-calendar-4625d16a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from date-math.datemath.workers.dev](https://www.zero.xyz/host/date-math.datemath.workers.dev/llms.txt)
