A House Divided A House DividedDocumentation
Changelog
Game Design/Economy & Finance

Stock Market

Last updated 2026-08-20
Player wikiStock Market
Source files

Each country has a stock exchange hub listing corporations, bonds, commodities, wealth rankings, and market statistics.

Routes#

Active exchanges are config-driven from COUNTRY_CONFIGS.exchangeName (, exposed via ): every country with an exchangeName set gets a registered venue automatically, no per-exchange wiring needed. 21 exchanges are configured as of this writing, including NYSE (US), FTSE (UK), DAX (DE), and Nikkei (JP).

Tabs (URL tab=)#

Tab order: Stocks (stocks), Bonds (bonds), Commodities (commodities), Forex (forex), Wealth List (wealth), Stats (stats). Legacy ?tab=listings is accepted and treated as Stocks. The active tab persists in the query string so browser back/forward and shared links work correctly.

Pages typically include market cap, share price, revenue and income snapshots, CEO pointers, sector type, and headquarters location. Stock price history is displayed as OHLC candlestick charts showing open, high, low, and close prices per period with high data density. A Corporate / Sovereign toggle splits the bond table; sovereign bonds display the issuing country's flag as their logo.

The Stats tab summarizes equity by sector (from the current listing set), a market-cap-by-sector pie, per-sector bar charts driven by one global metric control (revenue, profit, market cap, share price, dividend rate, with mcap-weighted average dividend per sector when that metric is selected), largest companies by sector cards (linked to corporate pages; colors use brandColor or a deterministic fallback), historical global sector market-cap lines (from marketCapHistory), and compact bond and commodity snapshots. Listings from GET /api/stock-exchange include brandColor and dividendRate for those visuals.

How it connects to other systems#

Discord Integration#