Repository navigation
feat: add FTSE 100 as an opt-in true index - #9
Open
knightmare2600 wants to merge 4 commits into
Open
knightmare2600 wants to merge 4 commits into
knightmare2600 wants to merge 4 commits into
Conversation
user-preferences.example.json has shipped MapStyle, MapProjection and MapOverlays since the map overhaul, but nothing read them: the map always started on Earth at Night / Flat / Day-Night, and Save-UserPreferences rewrote the file with a fixed key set, deleting the three keys on the first save. There is no save on window close (it minimises to the tray), so map changes were never persisted. - Save-UserPreferences now writes MapStyle, MapProjection and MapOverlays from the current toolbar state. - The style and projection pickers and the ten overlay toggles save when changed, as the exchange toggles already do. - Saved settings are applied straight after the pickers are populated, before change handlers are attached, so start-up does not redraw the map once per toggle. - New Private/Get-MapPreferenceState resolves the saved values. Unknown styles/projections fall back to the defaults; overlay names with no toggle (e.g. 'TimeLine' from the original example file) are ignored; an empty MapOverlays list means all overlays off; a missing key keeps the XAML defaults. - PSExchangeClock.psm1 now dot-sources Private/*.ps1 (not exported). - Pester tests in Tests/MapPreferences.Tests.ps1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds Nasdaq Copenhagen (Nasdaq København) as the 21st exchange, using the existing exchange, holiday, map, flyout, world-clock and preference mechanisms. It is not active by default; existing saved selections are left unchanged. Exchange - Code XCSE, symbol OMXC, Copenhagen, Denmark, DKK, 55.6761 / 12.5683. - TimeZoneId 'Romance Standard Time' (Windows ID that .NET maps from IANA Europe/Copenhagen); CET/CEST comes from the OS timezone rules. - Main-market equities 09:00-17:00 local. New optional exchange fields OpeningAuctionStart (08:45) and ClosingAuctionStart (16:55) make the status read "Opening auction - opens in ..." and "Closing auction - ends in ..." instead of presenting the call phases as pre-market or continuous trading. Status values, colours and notifications are unchanged. The flyout lists both auction windows. - Sources: Nasdaq European Markets Trading Hours and Holiday Schedule (https://www.nasdaq.com/european-market-activity/trading-hours) and the Nasdaq INET Nordic Auctions factsheet 1015-26. Holidays - holidays.json gains the official Nasdaq Copenhagen equity closures for 2025-2027 (checked 2026-10-09). Nasdaq lists no Copenhagen half days. These differ from Danish public holidays (24 and 31 December are exchange closures). Later years are not yet published. Supporting changes - Exchange status logic moved from the dashboard into Private/Get-ExchangeSessionStatus.ps1 (behaviour preserved) so it can be tested without WPF. Countdowns are now measured in UTC, so they stay correct on DST transition days. Format-CountdownSpan replaces the inline countdown formatting. - Private/Test-ExchangeActive holds the existing saved-selection logic. - Get-StockExchangeData appends built-in exchanges missing from a cache younger than 30 days, without overwriting cached entries, so existing installs see the new exchange without -ForceRefresh. - README, about help, docs and manifest description updated (20 -> 21 exchanges); README's ActiveExchanges default corrected to the seeded example list. - Pester tests: sessions, auctions, weekends, holidays, CET/CEST transitions, machine-timezone independence, missing holiday data, selection persistence and cache handling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds OMXC25 as a true index (not an ETF proxy) on the existing Indices tab, associated with Nasdaq Copenhagen (XCSE), Denmark, DKK. Provider and plan - Twelve Data /quote, symbol OMXC25. Twelve Data's /indices catalogue lists it as "OMX Copenhagen 25 Index" (DKK) with access level "Pro", so free/Basic keys get HTTP 403. The index is therefore turned off by default: the row is shown greyed out with a note explaining why, and no request is made. Enable it by adding "EnabledIndices": ["OMXC25"] to user-preferences.json (new optional preference, carried through Save-UserPreferences; no Settings UI yet). When enabled - Fetched in its own request with its own 15-minute cache, so a plan restriction or failure never affects the existing ETF batch. - HTTP 403/404 stop further requests for that key for the session (no wasted credits); 429/network errors retry after the TTL and keep showing the last good quote. - Status line: Intraday (may be delayed) / Last close / Stale / Unavailable, judged against the dashboard's own Nasdaq Copenhagen hours and holidays rather than Twelve Data's is_market_open (which files OMXC25 under Stockholm, XSTO). Stale values are greyed out. Twelve Data does not state whether quotes are real-time, so nothing is labelled "live". Quote time is shown in Copenhagen time. Code - Private/IndexQuotes.ps1: index definitions (the eight ETF proxies moved here unchanged), Test-IndexEnabled, Twelve Data quote parsing, per-index cache with back-off, and quote-status classification. - README: OMXC25 section with enabling and troubleshooting steps. - Pester tests: registration, opt-in, parsing, mocked retrieval, network failure, cache/TTL/back-off and quote status. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The London Stock Exchange (XLON) is already supported as an exchange;
this adds its headline index, the FTSE 100, to the Indices tab using
the same opt-in mechanism as OMXC25.
- Twelve Data symbol 'FTSE' ("FTSE 100", GBP, mic_code XLON in the
/indices catalogue, access level "Grow"). Off by default and shown
greyed out with a note; enable with "EnabledIndices": ["FTSE"].
- The request is pinned with mic_code=XLON: symbol_search shows the
bare ticker FTSE is also the Amundi MSCI UK IMI SRI Climate Paris
Aligned ETF on Euronext Paris (XPAR).
- Index definitions gain MicCode and RequiredPlan; the HTTP 403 message
now names the plan the index needs instead of always saying "Pro".
- Quote status is judged against London hours. holidays.json has no
UK dates, so on a bank holiday an old quote shows as Stale.
- Tests: registration, opt-in independent of OMXC25, mic_code sent on
the request and through the cache layer, status against LSE hours.
Not verified against a live Grow-plan key; request and response shape
follow the Twelve Data /quote documentation.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Oct 9, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the FTSE 100 to the Indices tab as an opt-in true index, using the same mechanism as OMXC25.
Why: the exchange versus its index
XLON) is already supported as an exchange: the marketplace and its hours.Details
FTSE("FTSE 100", GBP,mic_codeXLON) with access levelGrow:/indices?symbol=FTSE&show_plan=true."EnabledIndices": ["FTSE"]; it can be combined with"OMXC25".mic_code=XLON. The bare tickerFTSEis also the Amundi MSCI UK IMI SRI Climate Paris Aligned UCITS ETF on Euronext Paris (symbol_search?symbol=FTSE).mic_codeis a documented/quoteparameter (Twelve Data docs).MicCodeandRequiredPlan. The HTTP 403 message now names the plan each index needs instead of always saying "Pro".Known limitation
holidays.jsonhas no UK dates, so on a bank holiday an old quote shows as Stale rather than Last close.Checks
mic_code=XLONsent on the request and through the cache layer;Lintworkflow already fails onmainbefore this change — PSScriptAnalyzer reports 120 Warning-level findings there (e.g. run 36486962685). This PR adds no new findings (compared by rule, file and message againstmain), so a red Lint check here is the pre-existing state.[Unreleased]. The PRs in this series are independent where possible, so whichever merges second will have a trivial conflict in that section — keep both entries.This is one of a series of small PRs (fixes and features kept separate so you can pick and choose): #2 countdown hours · #3 Refresh button · #4 map preferences · #5 Nasdaq Copenhagen · #6 OMXC25 · #7 FX DKK/SEK · #8 København clock · #9 FTSE 100 · #10 ETF labels.
🤖 Generated with Claude Code