> For the complete documentation index, see [llms.txt](https://stonkmarket.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://stonkmarket.gitbook.io/docs/concepts/market-hours.md).

# Market Hours

Tokens on stonk.market only trade when the New York Stock Exchange is open. This isn't a soft convention — it's enforced on-chain, in two independent places. If the NYSE is closed, no swap and no token transfer will land.

The check runs at both layers as defence in depth:

* The **StonkHook's `beforeSwap`** reverts any Uniswap v4 swap while the market is closed.
* The **token's own transfer function** gates every `transfer` / `transferFrom` the same way.

Either one alone would block off-hours trading; together they mean there is no path — swap, wallet-to-wallet, or otherwise — to move a token while the NYSE is shut.

## The Schedule

|                   |                      |
| ----------------- | -------------------- |
| **Open**          | 9:30 AM Eastern Time |
| **Close**         | 4:00 PM Eastern Time |
| **Weekends**      | Closed               |
| **NYSE Holidays** | Closed               |

That's about 32.5 hours per week of tradable time. Outside that window, every buy and sell reverts.

## Why Restrict Trading?

Most crypto markets run 24/7. That makes them exhausting and easy to manipulate during low-liquidity hours. Constraining trading to NYSE hours:

* Creates the same daily rhythm equities traders are used to — an open, a close, and a quiet overnight.
* Concentrates volume into a known window, which generally means tighter spreads and more honest price discovery.
* Removes the worst time for retail to be trading (3 AM, half-asleep, against bots).

## Daylight Saving Time

The oracle handles this automatically. The market open time in UTC shifts between 13:30 and 14:30 depending on the season, following US DST rules (second Sunday in March, first Sunday in November).

## Holidays

The oracle keeps an on-chain calendar of NYSE holidays. The ten currently loaded:

* New Year's Day
* Martin Luther King Jr. Day
* Washington's Birthday (Presidents' Day)
* Good Friday
* Memorial Day
* Juneteenth
* Independence Day
* Labor Day
* Thanksgiving Day
* Christmas Day

Holidays are loaded by the oracle owner in advance, a year at a time, and the owner can add, move, or remove dates at any point. Every change applies immediately to every token pointing at the oracle — including tokens deployed long before the change. Read the live calendar with `getHolidays()`.

## What Counts as a Transfer

Between the hook and the token gate, the market-hours check covers **every** way a token can move:

* Uniswap v4 swaps — gated by the hook's `beforeSwap`.
* Every `transfer` / `transferFrom` — gated by the token's transfer function.
* Wallet-to-wallet transfers — gated.
* The factory seeding liquidity and the dev allocation at launch — **exempt** (otherwise a launch outside market hours would fail).
* Minting the fixed supply at launch, and any burn — **exempt** (these run through `_update()` directly, not the public transfer path).

There is no graduation event to consider — the pool is a live Uniswap v4 market from launch, and both layers gate it whenever the NYSE is closed.

***

## Details

The oracle exposes four states:

```solidity
enum MarketState {
    HOLIDAY,      // Closed for holiday
    WEEKEND,      // Closed for weekend
    AFTER_HOURS,  // Weekday but outside 9:30-4:00 ET
    OPEN          // Market is open
}
```

Two guards read the same oracle:

* The **StonkHook's `beforeSwap`** rejects any Uniswap v4 swap on a stonk pool while the market is closed.
* The token's public `transfer()` / `transferFrom()` carry a trading-window modifier that gates every ordinary transfer.

Both resolve the window the same way:

1. Before `launchTime` (the next NYSE open computed at deploy) the token is locked — trading cannot start until the first bell. The factory's one-shot launch actions (seeding liquidity, the dev allocation) are exempt so the launch transaction itself can complete.
2. From `launchTime` onward, delegate to `marketHoursOracle.isMarketOpen()`.

If the check fails, the swap or transfer reverts.

Holidays are stored as `YYYYMMDD` integer keys (e.g. `20260101` for Jan 1, 2026). The oracle owner can add, remove, or amend holidays without touching deployed tokens — see [MarketHoursOracle](/docs/smart-contracts/market-hours-oracle.md) for the full interface.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://stonkmarket.gitbook.io/docs/concepts/market-hours.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
