Skip to content
MarketCalendars.com
Sign up

API documentation

REST API v2: trading hours, holidays and settlement days as JSON over HTTPS

Errors

Errors use RFC 9457 problem details with the content typeapplication/problem+json. Check the HTTP status first, then type, which is a stable URL for each kind of error. title and detail are for people and may change.

Only successful (2xx) responses count against your quota. Errors are free.

GET /api/v2/markets/nyse/sessions/2026-02-30400
{
  "type": "https://marketcalendars.com/docs/api/errors#invalid-parameter",
  "title": "Invalid parameter",
  "status": 400,
  "detail": "date: Must be a real calendar date",
  "instance": "/markets/nyse/sessions/2026-02-30",
  "errors": [
    {
      "path": "date",
      "message": "Must be a real calendar date"
    }
  ]
}

Error types

invalid-parameter400Invalid parameter

A path or query parameter is malformed, such as a date that is not YYYY-MM-DD

unauthorized401Missing or invalid API key

The Authorization header is missing, malformed, or names a revoked key

unknown-market404Unknown market

No market has that id. GET /markets lists every id

out-of-range404Outside our data

The date or year is outside the market's coverage

not-found404Not found

No endpoint has that path

rate-limited429Too many requests

The key sent more requests in a minute than its plan's burst limit

quota-exceeded429Quota used up

The plan's requests for this period are used up

internal-error500Internal error

Something failed on our side. Retry later; tell us if it persists

Extra fields

  • invalid-parameter adds errors, a list of { path, message } for each bad parameter
  • out-of-range adds coverage with the first and last dates we have for the market
  • rate-limited sends a Retry-After header in seconds
  • quota-exceeded adds resetsAt, the start of your next quota period, or null for the free trial