Skip to content
MarketCalendars.com
Sign up

API documentation

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

Authentication

Every endpoint except /openapi.json needs an API key. Send it in the Authorization header with theBearer scheme. Keys in query strings are not accepted.

curl https://marketcalendars.com/api/v2/markets/nyse/status \
  -H "Authorization: Bearer mc_live_..."

Keys

  • A key looks like mc_live_ followed by 43 random letters and digits
  • Create keys under Account, API keys. You can have up to 5, each with a name
  • The full key is shown once, when you create it. We store only a hash, the first 12 characters and the last 4
  • The account page shows when each key was last used. Revoking a key takes effect immediately
  • All keys on an account share its plan's quota

Keep keys secret

Call the API from your server, not from browser or mobile app code, where anyone can read the key. If a key leaks, revoke it and create a new one.

Missing or invalid keys

A request without a valid key gets a 401 response and does not count against your quota:

401 Unauthorized
{
  "type": "https://marketcalendars.com/docs/api/errors#unauthorized",
  "title": "Missing or invalid API key",
  "status": 401,
  "detail": "Send your key as Authorization: Bearer mc_live_...",
  "instance": "/api/v2/markets/nyse/status"
}