Skip to content
MarketCalendars.com
Sign up

API documentation

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

Get the current Unix time

GET/api/v2/time/now

The current Unix time in seconds, milliseconds, microseconds and nanoseconds, with ISO 8601 and RFC 2822 in a zone. Free, no key needed. The Workers clock has millisecond resolution, so microseconds and nanoseconds end in zeros

Free: no key needed and not counted towards your quota. Limited to 60 requests per minute per IP address

Parameters

NameInDescription
tzoptionalqueryIANA time zone for zone. Defaults to UTCExample: America/New_York

Example

curl "https://marketcalendars.com/api/v2/time/now?tz=America/New_York"
GET /api/v2/time/now?tz=America/New_York200
{
  "seconds": 1793992989,
  "milliseconds": 1793992989382,
  "microseconds": "1793992989382000",
  "nanoseconds": "1793992989382000000",
  "utc": "2026-11-06T19:23:09.382Z",
  "zone": {
    "id": "America/New_York",
    "local": "2026-11-06T14:23:09.382-05:00",
    "rfc9557": "2026-11-06T14:23:09.382-05:00[America/New_York]",
    "rfc2822": "Fri, 06 Nov 2026 14:23:09 -0500",
    "offset": "-05:00",
    "abbreviation": "EST",
    "dst": false
  },
  "calendar": {
    "weekday": "Friday",
    "isoWeek": "2026-W45",
    "dayOfYear": 310
  }
}

A live response from the API. Lists longer than seven items are cut to three here

Response fields

TimeNow object. Fields marked | null are always present and may be null

FieldTypeDescription
secondsintegerUnix time in whole seconds, rounded down
millisecondsintegerUnix time in whole milliseconds, rounded down
microsecondsstringUnix time in microseconds. A string, as it exceeds 2^53
nanosecondsstringUnix time in nanoseconds, exact. A string, as it exceeds 2^53
utcstring (date-time)ISO 8601 in UTC, with as many fraction digits as the value needs (0, 3, 6 or 9)
zoneobject
zone.idstringIANA time zone
zone.localstring (date-time)ISO 8601 in the zone, with its UTC offset
zone.rfc9557stringISO 8601 with the offset and the zone in brackets (RFC 9557)
zone.rfc2822stringRFC 2822 date in the zone, whole seconds
zone.offsetstringUTC offset, ±HH:MM (±HH:MM:SS for local mean time before standard time)
zone.abbreviationstringZone abbreviation, or GMT±H where there is no common one
zone.dstbooleanWhether summer time is in force
calendarobjectCalendar facts in the zone
calendar.weekdaystringWeekday in the zone
calendar.isoWeekstringISO 8601 week in the zone
calendar.dayOfYearintegerDay of the year in the zone, 1 to 366

Errors

  • 400invalid-parameterA path or query parameter is malformed, such as a date that is not YYYY-MM-DD
  • 429rate-limitedThe key sent more requests in a minute than its plan's burst limit, or the client sent too many invalid keys