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

# Settings

# Settings

Stake presets, risk limits, theme and notifications (`/settings`). Backed by
`GET/PUT /settings` (`Settings` in `api/openapi.yaml`); field names below are the
contract's.

## Sections

| Section | Fields | Contract | |
| - | - | - | - |
| Trading | Stake presets (1–6 pUSD amounts) | `stake_presets` | |
| Risk limits | Max order notional, max position notional, max daily notional, max open orders, price band (ticks); for combos (Phase 8) max combo notional, max combo exposure, max combo legs | `risk.max_order_notional`, `risk.max_position_notional`, `risk.max_daily_notional`, `risk.max_open_orders`, `risk.price_band_ticks`, and the combo fields as the Phase 8 contract names them (draft: `max_combo_notional`, `max_combo_exposure`, `max_combo_legs`) | |
| Safety | Cancel open orders on shutdown; dead-man heartbeat | `risk.cancel_on_shutdown`, `risk.heartbeat_enabled` | |
| Appearance | Theme: Dark / Light / System | `theme_mode` | |
| Account | Credentials status, wallet address, signer address (and the Session Key expiry when near); one muted line `Set in the server’s environment`. The env variables are listed in `docs/guides/configuration.md`, not here | `Account` | |
| Notifications | Channels (in-app, desktop, sound, Telegram) per notification kind, volume, Send test. Full spec in [notifications.md](notifications.md#settings--notifications) | \`GET | PUT /settings/notifications` (`NotificationSettings`), `POST /notifications/test\` |
| Hotkeys | The Navigation group of interactions.md, then `Show all hotkeys` (ghost), which opens the hotkey sheet (`?`). The full map is shown in one place only | none | |
| Session | Trading status (`/status`): `LIVE_TRADING`, geoblock country and last check; `Log out` and `Log out everywhere` (ghost, one height; the second's tooltip: `Ends every session of this app, on every device, this one included`) | `Status` | |

Safety is a section of its own, with the same heading level as the others, in the desktop
nav and in the phone list (`?section=safety`). It shares the Risk limits form, so a switch
and a limit still save one at a time.

## Layout

* One rhythm from the spacing scale: 24 px between sections with one divider, 16 px between
  rows, 8 px between a label and its description. Every section heading has the same top
  spacing; the first has none, so it lines up with the page title.
* A limit or switch row: the label (14 px semibold) and its one-line description (13 px
  muted) on the left; the control in a 160 px right column, centred on the label block. The
  ceiling note sits 4 px under the field, in a column exactly the field's width, right
  aligned, so field and note share one right edge on every row. A note longer than the field
  (an error) runs on to the left.

## Desktop

```
 ┌───────────────────┬──────────────────────────────────────────────────────────────┐
 │ Settings          │ Trading                                                      │ 36
 │                   │                                                              │
 │ |Trading          │ Stake presets                                                │ 20 label
 │  Risk limits      │ One click buys this much at the clicked price. 1–6 presets…  │ 18 description
 │  Safety           │ [$  1,000 x] [$  2,500 x] [$  5,000 x] [$ 10,000 x]          │ 32
 │  Appearance       │ [$ 25,000 x]  Add preset                                     │ 32
 │  Account          │ ──────────────────────────────────────────────────────────── │ divider
 │  Notifications    │ Risk limits                                                  │
 │  Hotkeys          │ Every order is checked against these limits before it is…    │
 │  Session          │ Max order notional                         [ $      25,000 ] │ 32
 │                   │ Largest single order                        Ceiling $50,000  │ 16 note
 │                   │ Max open orders                            [    100 orders ] │
 │                   │ Orders resting at once                    Ceiling 200 orders │
 │                   │ Max orders per minute                      [       60 /min ] │
 │                   │ Orders placed in any one minute              Ceiling 120/min │
 │                   │ ...                                                          │
 │                   │ ──────────────────────────────────────────────────────────── │
 │                   │ Safety                                                       │
 │                   │ Cancel on shutdown                                      (on) │ 20
 └───────────────────┴──────────────────────────────────────────────────────────────┘
   200 section nav      640 form column, 24 px padding; sections scroll as one page
```

* Section nav: 200 px, links scroll to the section (smooth jump); the section in view
  is marked with a 2 px `--foreground` bar.
* Stake presets save as the limits do, with no Save button: the whole list saves when Enter
  is pressed in a chip or the chip is left (blur), and when a chip is removed, then shows the
  toast `Stake presets saved`. `Add preset` adds an empty chip with focus; a chip left empty
  is dropped. While a chip fails a field rule, or the list would be empty, nothing is saved
  and the errors are listed under the chip row (`Preset 2: Must be more than 0`, `At least
  one preset`, `Not saved · …`); a refused list stays in the chips.
* Risk limits and Safety save one field at a time, with no Save button: a limit saves when
  Enter is pressed or its field is left (blur, which includes leaving the page), a switch
  when it is flipped. Each save sends the saved limits with that one value changed.
  * A tighter value applies at once, with no password, and shows the toast
    `<Limit> saved` (`Max order notional saved`).
  * A looser value (a higher cap, a shorter duplicate window, a safety switch turned off)
    opens the password prompt at once (`Raising the max order notional needs the UI
    password`). `Cancel`, or leaving the page before the prompt is done, puts the saved
    value back in the field and shows the toast `<Limit> not raised` (`Max order notional
    not raised`; `not lowered` for the duplicate window, `not turned off` for a switch).
    Leaving the page is never blocked.
  * While a typed value differs from the saved one, the note under the field reads
    `Unsaved · Enter to save` in place of the ceiling. A value that fails a field rule or the
    save keeps its note in red (`Above the ceiling ($50,000)`, `Not saved · …`) until it
    is changed. A field never shows a value as saved that the backend did not accept.
  * Saves run one at a time; each starts from the limits the previous one returned.
* Notifications save each change on their own, with no Save button
  ([notifications.md](notifications.md#settings--notifications)).
* Inputs: `--control-h` (32 px desktop, 44 px touch), one width (160 px desktop, the full
  content width on the phone), numeric (tabular), right-aligned, one 1 px `--input` border
  on the page surface with no fill, and the focus ring. Every unit is a muted affix inside
  the field: `$` before a USD amount; `orders`, `/min`, `ticks`, `ms`, `min` or `legs` after
  a count. At rest a value shows thousands separators (`25,000`); while the field has focus
  it shows the raw digits, and separators typed or pasted are dropped. Ceilings and preset
  values come from `lib/format` without trailing zeros (`$50,000`, `10,000 ms`, `120/min`).
  Decimals are typed and sent as strings; the browser does no arithmetic on them.
* Switches: off is an outlined track with a muted thumb, on a filled `--primary` track with
  a light thumb.

### Field rules

| Field | Validation | Help text |
| - | - | - |
| Stake preset | > 0, ≤ 6 decimals, ≤ max order notional; 1 to 6 presets; duplicates removed on save | `One click buys this much at the clicked price` |
| Max order notional | > 0; ≤ saved max position and max daily notional | `Largest single order` |
| Max position notional | ≥ saved max order notional | `Largest position per market` |
| Max daily notional | ≥ saved max order notional | `Total order notional per day` |
| Max open orders | integer ≥ 0 | `Orders resting at once` |
| Price band | integer ≥ 1 | `How far a clicked price may be from the touch` |
| Max combo notional | > 0; ≤ saved max combo exposure | `Largest stake for one combo, fees included` |
| Max combo exposure | ≥ saved max combo notional | `Total cost of open combo positions` |
| Max combo legs | integer 2–50 | `Most legs in one combo` |
| Cancel on shutdown | toggle | `Cancel all open orders when the backend stops` |
| Heartbeat | toggle | `Polymarket cancels all open orders if the backend stops responding` |

* Stake presets are chips styled as the limit fields (`$` inside, thousands separators at
  rest, 128 px; two columns on the phone), with `Add preset` as a ghost button at the
  control height in the same row. The `[x]` icon button inside a chip removes
  one (disabled on the last one); `Add` is disabled at 6. Drag to reorder: the order is the order of the
  stake selector and hotkeys `1`–`6`.
* Theme applies immediately on click (preview) and is part of the save.

## Mobile

* `/settings` shows the section list (52 px rows with chevrons). Each section opens as a
  full-screen page with a back button.
* The same fields, stacked: label and description above a full-width 44 px input (16 px
  text), the ceiling 4 px under it, right-aligned. The section heading sits 16 px under the
  header.
* Stake presets and risk limits save on the keyboard's Done key (Enter) or when the field is
  left, as on desktop.
* Notifications: the channel table, permission flow and test are in
  [notifications.md](notifications.md#mobile-390-px).


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