Skip to content

IFluidUsEquityMarketHours ​

Git Source

Shared US equity market-hours schedule for Chainlink 24/5 stock oracles.

Week-ahead session list; lookup never reverts — UNKNOWN if missing/undefined (fail-open). Off-chain writer is complementary only. Session type return values (SESSION_TYPE_* in implementation Constants):

  • UNKNOWN (0) — empty schedule, or time outside any stored entry
  • REGULAR (1) — regular trading hours (also valid stored entry type)
  • EXTENDED (2) — after durationMinutes, for extendedDurationMinutes
  • HOLIDAY (3) — inside a HOLIDAY entry’s main window (also valid stored entry type) Regular-hours window: latestRegularHoursStart_ == 0 means none found (no separate found flag).

Functions ​

getSessionType ​

Session type at timestamp_.

solidity
function getSessionType(uint256 timestamp_) external view returns (uint256 sessionType_);

getCurrentSessionType ​

Session type at block.timestamp.

solidity
function getCurrentSessionType() external view returns (uint256 sessionType_);

getSessions ​

Full week-ahead session schedule currently stored.

solidity
function getSessions() external view returns (Structs.Session[] memory sessions_);

getLatestRegularHoursWindow ​

Most recent REGULAR session window at or before timestamp_.

latestRegularHoursStart_ == 0 if none found.

solidity
function getLatestRegularHoursWindow(uint256 timestamp_)
    external
    view
    returns (uint32 latestRegularHoursStart_, uint32 latestRegularHoursEnd_);

getSessionInfo ​

Session type at timestamp_, plus the latest REGULAR-hours window at or before that time.

latestRegularHoursStart_ == 0 if no REGULAR window found.

solidity
function getSessionInfo(uint256 timestamp_)
    external
    view
    returns (uint256 sessionType_, uint32 latestRegularHoursStart_, uint32 latestRegularHoursEnd_);

getCurrentSession ​

Like getSessionInfo(block.timestamp), advancing the schedule cursor.

latestRegularHoursStart_ == 0 if no REGULAR window found.

solidity
function getCurrentSession()
    external
    returns (uint256 sessionType_, uint32 latestRegularHoursStart_, uint32 latestRegularHoursEnd_);