Open Cross

Sessions and the calendar

Every pool points at a calendar account. The calendar is the only source of time rules the program has, so the program never needs a time zone.

What a calendar holds

A calendar covers one year and stores 366 sessions, one per day of the year. A session is either closed for the whole day or carries an open and a close time. Daylight saving is already baked in when the table is written, so the program compares plain unix seconds.

For the US market the table follows the NYSE schedule:

RuleValue
Regular session9:30 to 16:00 New York time
Early close13:00 New York time (for example November 27, 2026 and December 24, 2026)
Full holidays in 2026Jan 1, Jan 19, Feb 16, Apr 3, May 25, Jun 19, Jul 3, Sep 7, Nov 26, Dec 25
Daylight time 2026open 13:30 UTC; from Nov 2, open 14:30 UTC

Changing a calendar

A calendar is written in pages (WriteCalendar), then sealed (SealCalendar). After sealing, changes go through AmendCalendar, one day at a time, with notice:

ChangeMinimum notice
Adds trading time (a new session, an earlier open, a later close)7 days before the affected day
Only removes trading time (an emergency closure, an early close)1 hour
A freshly sealed year becomes usable7 days after sealing

Removing trading time can come fast because closing more never makes a pool trade at a stale price.

The phase crank

Swaps and orders never read the calendar directly. Each pool caches the session it is in (previous close, next open, next close). CrankPhase refreshes that cache from the calendar and anyone can call it. If the cache may be out of date, the pool reads as stale and nothing trades until someone cranks.

The pool is always in one of these phases:

PhaseWhenWhat works
Openbetween the bell and the closeswaps (fee easing from 0.60% to 0.25% over the first 30 minutes), deposits, withdrawals
Closedbetween the close and the collection windowswaps at the rising closed hours fee, deposits, withdrawals
Collectthe 10 minutes before the bellplacing and cancelling cross orders only (no cancels in the last 2 minutes)
Duethe bell has rung, the cross has not runRunCross only
Stalethe cache must be refreshedCrankPhase only

The next session is searched up to 14 days ahead. A longer gap leaves the pool closed at its peak fee until a crank finds the next session.

Errors you may see

ErrorMeaning
PhaseStalecrank the pool before trading
CrossInProgressswaps and LP changes wait until the cross has run
NotCollectingorders can only be placed during the collection window
NotDuethe bell has not rung yet
NoticeTooShorta calendar amendment did not give enough notice
CalendarUnavailablethe next year's calendar is not sealed and usable yet