> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rekt.money/llms.txt
> Use this file to discover all available pages before exploring further.

# Markets

> The live markets, BTC, ETH, SOL, XRP and HYPE, their hours, and the four states a market can be in.

**Live: BTC, ETH, SOL, XRP and HYPE.** All five trade around the clock. Gold (XAU/USD) is not
available for now. Each market carries its own calendar on chain (`market.sessions`), so read a
market's state rather than assume it is open.

> [!NOTE]
>
> This page gives the rules. For the states as a type, and the fields on them, see
> [how it works](https://docs.rekt.money/how-it-works.md#the-price-that-decides-your-outcome) and [reading
> gates](https://docs.rekt.money/sdk/gates.md).

## The markets

| Market | Hours (UTC) | Size |
| - | - | - |
| BTC | Always open | 1000x |
| ETH | Always open | 1000x |
| SOL | Always open | 1000x |
| XRP | Always open | 1000x |
| HYPE | Always open | 1000x |

Minute rounds run on BTC, ETH, SOL and XRP (`market.minuteEnabled` is true).

Only the markets in the table are open to trade. A paused market refuses new opens and adds with
`MarketPaused`, and closes keep working.

## Markets with trading hours

> [!NOTE]
>
> No live market has trading hours. Gold (XAU/USD) follows the rules below, and it is not available
> for now.

## When gold trades

Gold trades in five sessions each week. Each session opens at 23:00 UTC and closes at 21:00 UTC on
the next day.

| Session opens (UTC) | Session closes (UTC) |
| - | - |
| Sunday 23:00 | Monday 21:00 |
| Monday 23:00 | Tuesday 21:00 |
| Tuesday 23:00 | Wednesday 21:00 |
| Wednesday 23:00 | Thursday 21:00 |
| Thursday 23:00 | Friday 21:00 |

Gold is closed from 21:00 to 23:00 UTC on Monday to Thursday, and from Friday 21:00 UTC to Sunday
23:00 UTC. **The hours are fixed in UTC.** They do not move when clocks change for daylight saving.

A scheduled event window can halt a market for a few minutes. Windows are entries on the market's
account (`market.eventWindows`), so read them there. While a window lasts, opens and adds are refused
and the market reads **halted**.

## What happens in each gold session

| Time (UTC) | Opens | Adds | Positions |
| - | - | - | - |
| 23:00 to 20:25 | Accepted | Accepted, see rule 3 | A new position's life ends at 20:30 at the latest. |
| After 20:25, to 20:30 | Refused, `SessionEndsBeforeTenor` | Accepted on a live position, see rule 3 | Live until 20:30. |
| 20:30 to 21:00 | Refused, `SessionEndsBeforeTenor` | Refused | Every position's life has ended. Anybody may mark its end, and it is closed at the next price. |
| At 21:00 | Refused, `MarketClosed` | Refused | The session closes. A position that is not settled before the close ends at par. |
| 21:00 to 23:00 | Refused, `MarketClosed` | Refused | No new gold position opens. A quote signed after the close never prices a position from the session before. |

The rules behind that table:

1. **Every gold position ends by 20:30 UTC on the day its session closes.** Its life is the protocol
   tenor (`config.params.tMaxSeconds`) or the time left until 30 minutes before the close,
   whichever is shorter. The 30 minutes is `market.sessionBufferS`. The life is frozen onto the
   position at open; `deadlines(position).tenorExpiresAt` reads it.
2. **Opens stop 35 minutes before the close.** A new position must get at least five minutes of
   life, so from 20:25 UTC an open is refused with `SessionEndsBeforeTenor` and the market reports
   **closing soon**. Open again after 23:00 UTC.
3. **Adds follow the position, not the clock.** You can add to a live gold position until its own
   life ends: the venue judges an add against the position's remaining life, not against the whole
   frozen tenor. An add that would outlive the session is not filled: it is returned in full, with
   cause 6. The SDK's add gate refuses such an add before you send it.
4. **From 20:30, a gold position is closed at the market price.** When its life has ended, anybody
   may mark its end (`mark_expiry`), and it is closed at the first price after a short delay from
   the mark (`tenorExpiry`). It is paid what it is worth, gain or loss.
5. **A position that is not settled before its session's close ends at par.** A quote signed after
   the close never prices a position from the session before. Such a position is closed with no quote (`lastResort`):
   a live position gets its stake back with no exit fee. A position already stamped at a level is paid that
   level, and a target level pays the exit fee. This close is refused while the oracle is frozen.
   See [the no-price close](https://docs.rekt.money/sdk/settling.md#the-no-price-close).

**The workaround for rule 2:** read the state before you build a transaction. `availability()`
reports **closing soon** together with `forceCloseAt`, the time at which positions on that market
end. Poll it, or read the market's calendar directly.

## Holidays, early closes and pauses

**The calendar is the regular weekly schedule. It has no holidays.** For a holiday or an early
close, the venue can pause gold for that session. **The venue can also pause gold
at other times.** While gold is paused, opens and adds are refused with `MarketPaused`, and closes
continue. Read `market.paused`, or the market's state, and do not assume that the weekly schedule
holds on every date.

## The four states

A market is always in exactly one of four states. Branch on the state, not on a single `isOpen`
boolean.

| State | What it means |
| - | - |
| **Open** | Opens, adds and closes all proceed normally. |
| **Closing soon** | The session is open, but **opens are refused**. Adds to a live position are accepted until its life ends, at `forceCloseAt`. |
| **Closed** | The session is closed. Opens and adds are refused. A market that is always open never enters this state. |
| **Halted** | A separate stop: a scheduled event window, a pause, or a feed that has stopped answering during an open session. It does not mean the session is closed. |

## Where to go next

> [card] [Reading gates](https://docs.rekt.money/sdk/gates.md)
>
> Every refusal a market with trading hours can raise, before you send.

> [card] [Error handling](https://docs.rekt.money/sdk/errors.md)
>
> The refusals by name and code, and whether retrying can ever help.

> [card] [Opening a position](https://docs.rekt.money/sdk/opening.md)
>
> The transaction shape, and where an availability check belongs in it.

> [card] [How it works](https://docs.rekt.money/how-it-works.md)
>
> The product mechanics this page assumes.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.