Skip to main content

Module expiry_times

Module expiry_times 

Expand description

Per-underlying expiry time-of-day configuration.

Option symbols encode expiry as a YYYYMMDD date only; the time of day an instrument expires is policy. This module is the single authority for resolving that policy: a global default (08:00 UTC, the Deribit convention) plus per-underlying overrides (e.g. SPCX expires 20:00 UTC, 4 PM ET).

The resolved expiry timestamp is consensus-critical: it is embedded in the Create2 salt of on-chain option tokens (see option_token_address). Changing an underlying’s expiry time while it has listed instruments changes those instruments’ derived timestamps and token addresses. Treat the configured value as immutable once instruments exist.

The process-wide configuration is installed once at startup via install_expiry_times. Binaries that never install (tools, tests) resolve everything to the 08:00 UTC default.

Structs§

ExpiryTime
A UTC time of day at which instruments expire.
ExpiryTimes
Process-wide expiry time policy: a default plus per-underlying overrides.
ExpiryTimesInstallError
Error returned when installing the process-wide expiry times fails.

Enums§

ExpiryTimeParseError
Error returned when parsing an expiry time string.

Constants§

DEFAULT_EXPIRY_TIME
Default expiry time of day: 08:00 UTC (Deribit convention).

Functions§

expiry_times
The active expiry time policy: the installed configuration, or the all-defaults policy (08:00 UTC) if none was installed.
install_expiry_times
Install the process-wide expiry time policy. Call once at startup, before any component derives expiry timestamps.