Dates & calendars
The datetime format, timezones and exchange calendars.
Every date and time the API accepts or returns is a plain string in one of two forms. There is nothing else to learn — the same standard holds across the REST API and the MCP server, on input and on output.
The one standard
| When | Format | Example |
|---|---|---|
| A date is enough | YYYY-MM-DD | 2020-01-03 |
| A time matters too | YYYY-MM-DD HH:MM:SS | 2020-01-03 16:00:00 |
Which form you get for a given field depends only on whether the time-of-day is meaningful for that field — an API key's created_at is a date, an index value's time is a full timestamp. Both forms are UTC. The string never carries a timezone designator: there is no T separator, no trailing Z, and no +00:00 offset. The date and the time are separated by a single space.
Input is lenient; output is canonical
T separator and a trailing Z (2020-01-03T00:00:00Z) and normalises them for you — but
emit the plain space-separated form and you never have to think about it.The one parsing gotcha
Because a timestamp carries no timezone designator, a parser that assumes a bare timestamp is local time will silently shift every point in your series by your machine's offset. Treat the string as UTC when you parse it.
`new Date("2020-01-03 16:00:00")` is parsed as local time
T and append a Z — before handing it to Date. In
Python, datetime.fromisoformat parses both forms directly; attach tzinfo=timezone.utc yourself.from datetime import datetime, timezonedef parse_time(value: str) -> datetime:"""Parse an Index One date or datetime as an aware UTC datetime."""# fromisoformat handles both "YYYY-MM-DD" and "YYYY-MM-DD HH:MM:SS".parsed = datetime.fromisoformat(value.strip())return parsed.replace(tzinfo=timezone.utc)
Timezones live on the index, not the timestamp
Serialised timestamps are UTC. The local context of an index — the timezone its close happens in — is configuration, held in index_parameters.
| Field | Format | Example |
|---|---|---|
timezone | IANA timezone name | US/Eastern |
eod_time | HH:MM:SS, local to timezone | 16:00:00 |
exchange_calendar | MIC code | XNYS, XLON |
eod_time is a wall-clock time in the index's own timezone, which means the corresponding UTC instant moves twice a year with daylight saving. An index closing at 16:00:00 US/Eastern closes at 20:00 UTC while daylight time is in force and 21:00 UTC the rest of the year. Never precompute a fixed UTC close time and cache it across a DST boundary.
Exchange calendars
An exchange_calendar is a MIC code identifying a real trading calendar — XNYS for the New York Stock Exchange, XLON for London. It defines which days are sessions, which are holidays, and when each session opens and closes, including half days.
This is what makes "the previous trading day" a well-defined idea. Without a calendar, a schedule can only speak in calendar days and will happily fire on Christmas Day or the Monday of a bank holiday.
Trigger alignment
Trigger operations snap a schedule to the session grid of a calendar. Five parameters control it.
| Parameter | Meaning |
|---|---|
alignment_enabled | Turn calendar alignment on — without it, the schedule is plain calendar time |
align_time | The reference time the alignment is computed against |
trading_calendar | Which MIC calendar to align to |
trading_day | preceding or following — which side to snap to when the target is not a session |
session_time | close or open — which end of the session to use |
A typical daily configuration aligns to the preceding trading day at close on XNYS. That gives a run a stable, unambiguous "as of" point: the last completed session, whatever holidays intervened.
Alignment is evaluated in local time
Close + 15, stamped at the close
Live EOD does not run at the closing bell. It fires at close + 15 minutes, because closing quotes take time to settle and a value computed the instant the bell rings is computed against prices that are still moving.
The value it writes is nevertheless stamped at the close time, not at the time the calculation ran. So an index closing at 16:00:00 local produces a point timestamped 16:00:00, written around 16:15:00 local.
What this means for consumers