{
  "openapi": "3.1.0",
  "info": {
    "title": "Trading Calendar API",
    "version": "1.0.0",
    "description": "Is the US stock market open? NYSE and Nasdaq holidays, early closes and trading-day math, 1998 to 2200.\n\nIs the market open? The US equity trading calendar (NYSE/Nasdaq) computed from the published rules for any year from 1998 through 2200: the ten market holidays with correct observance (including the subtle ones — Good Friday from the Easter computus, Saturday holidays observed the preceding Friday, and the Saturday New Year rule under which the market simply has no New Year holiday, as in 2022), the 13:00 ET early closes (day after Thanksgiving, Christmas Eve, July 3 when the rules say so), regular 09:30-16:00 ET hours, next-trading-day resolution, and trading-day counts and lists for any date range (2026 has exactly 251). July 4 2026 falls on a Saturday, so the holiday endpoint correctly shows July 3 observed AND drops that year's July 3 early close. Pure computation — no scraped calendar that goes stale, answers in milliseconds at the lowest token cost. The scheduling backbone for trading apps, fintech backends, settlement-date math, options-expiry tooling and reporting jobs. Pairs with our Stock Tickers, Company Financials and Inflation APIs. Excludes unscheduled closures such as days of mourning.",
    "contact": {
      "name": "Data and APIs",
      "url": "https://dataandapis.com/contact"
    },
    "termsOfService": "https://dataandapis.com/terms-of-service",
    "license": {
      "name": "Data and APIs Terms of Service",
      "url": "https://dataandapis.com/terms-of-service"
    },
    "x-logo": {
      "url": "https://dataandapis.com/images/trading-calendar.webp"
    }
  },
  "externalDocs": {
    "description": "Documentation, live tester and pricing",
    "url": "https://dataandapis.com/apis/trading-calendar"
  },
  "servers": [
    {
      "url": "https://api-trading-calendar.dataandapis.com"
    }
  ],
  "tags": [
    {
      "name": "Finance",
      "description": "Trading Calendar API belongs to the Finance category of the Data and APIs catalog."
    }
  ],
  "paths": {
    "/v1/holidays": {
      "get": {
        "operationId": "marketHolidays",
        "summary": "Market Holidays",
        "description": "Market Holidays endpoint of the Trading Calendar API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/trading-calendar/market-holidays"
        },
        "parameters": [
          {
            "name": "year",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "note": "US equity markets (NYSE/Nasdaq), rules-based; excludes unscheduled closures",
                  "year": 2026,
                  "holidays": [
                    {
                      "date": "2026-01-01",
                      "name": "New Year's Day"
                    },
                    {
                      "date": "2026-01-19",
                      "name": "Martin Luther King Jr. Day"
                    },
                    {
                      "date": "2026-02-16",
                      "name": "Washington's Birthday"
                    },
                    {
                      "date": "2026-04-03",
                      "name": "Good Friday"
                    },
                    {
                      "date": "2026-05-25",
                      "name": "Memorial Day"
                    },
                    {
                      "date": "2026-06-19",
                      "name": "Juneteenth"
                    },
                    {
                      "date": "2026-07-03",
                      "name": "Independence Day",
                      "observed_for": "2026-07-04"
                    },
                    {
                      "date": "2026-09-07",
                      "name": "Labor Day"
                    },
                    {
                      "date": "2026-11-26",
                      "name": "Thanksgiving Day"
                    },
                    {
                      "date": "2026-12-25",
                      "name": "Christmas Day"
                    }
                  ],
                  "early_closes": [
                    {
                      "date": "2026-11-27",
                      "name": "Day after Thanksgiving",
                      "close": "13:00"
                    },
                    {
                      "date": "2026-12-24",
                      "name": "Christmas Eve",
                      "close": "13:00"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "marketStatus",
        "summary": "Market Status",
        "description": "Market Status endpoint of the Trading Calendar API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/trading-calendar/market-status"
        },
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-27"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "note": "US equity markets (NYSE/Nasdaq), rules-based; excludes unscheduled closures",
                  "date": "2026-11-27",
                  "is_trading_day": true,
                  "reason": null,
                  "early_close": true,
                  "hours_et": {
                    "open": "09:30",
                    "close": "13:00"
                  },
                  "next_trading_day": null
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/next": {
      "get": {
        "operationId": "nextTradingDay",
        "summary": "Next Trading Day",
        "description": "Next Trading Day endpoint of the Trading Calendar API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/trading-calendar/next-trading-day"
        },
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "2026-07-02"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "note": "US equity markets (NYSE/Nasdaq), rules-based; excludes unscheduled closures",
                  "after": "2026-07-02",
                  "next_trading_day": "2026-07-06",
                  "hours_et": {
                    "open": "09:30",
                    "close": "16:00"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    },
    "/v1/trading-days": {
      "get": {
        "operationId": "tradingDaysInRange",
        "summary": "Trading Days In Range",
        "description": "Trading Days In Range endpoint of the Trading Calendar API. Costs 1 token per call.",
        "externalDocs": {
          "url": "https://dataandapis.com/apis/trading-calendar/trading-days-in-range"
        },
        "parameters": [
          {
            "name": "dates",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "true"
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-01"
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "2026-11-30"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                },
                "example": {
                  "ok": true,
                  "note": "US equity markets (NYSE/Nasdaq), rules-based; excludes unscheduled closures",
                  "from": "2026-11-01",
                  "to": "2026-11-30",
                  "count": 20,
                  "dates": [
                    "2026-11-02",
                    "2026-11-03",
                    "2026-11-04",
                    "2026-11-05",
                    "2026-11-06",
                    "2026-11-09",
                    "2026-11-10",
                    "2026-11-11",
                    "2026-11-12",
                    "2026-11-13",
                    "2026-11-16",
                    "2026-11-17",
                    "2026-11-18",
                    "2026-11-19",
                    "2026-11-20",
                    "2026-11-23",
                    "2026-11-24",
                    "2026-11-25",
                    "2026-11-27",
                    "2026-11-30"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid API key"
          },
          "402": {
            "description": "Subscription past due; the response carries a payment_url"
          },
          "429": {
            "description": "Monthly token allowance exhausted"
          }
        },
        "security": [
          {
            "ApiKey": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Create a free key at https://dataandapis.com/sign-up. 500 tokens a month on the Free plan; this API costs 1 token per call."
      }
    }
  },
  "security": [
    {
      "ApiKey": []
    }
  ]
}