Files
worldmonitor/scripts
Elie Habib 95874c0582 fix(relay): load COMMODITY_SYMBOLS from shared/commodities.json (#1897)
* fix(relay): load COMMODITY_SYMBOLS from shared/commodities.json

The relay had a hardcoded 6-symbol list (VIX, Gold, Oil, NatGas, Silver,
Copper) that overwrote market:commodities-bootstrap:v1 every ~40 minutes,
wiping Platinum, Palladium, Aluminum, Brent, Gasoline, Heating Oil,
Uranium, and Lithium seeded by seed-commodity-quotes.mjs.

Use requireShared('commodities.json') — same source as the seed script
and the frontend — so adding a commodity to the JSON file is the only
change needed. YAHOO_ONLY is auto-derived: futures (=F) and indices (^).

* ci: trigger typecheck

* fix(relay): restore ^GSPC/^DJI/^IXIC in YAHOO_ONLY and add URA/LIT

Deriving YAHOO_ONLY from COMMODITY_SYMBOLS alone dropped the three major
indices (^GSPC, ^DJI, ^IXIC) which live in MARKET_SYMBOLS, not COMMODITY_SYMBOLS.
With Finnhub API key present, seedMarketQuotes() would route them through
Finnhub instead of Yahoo, potentially caching wrong index values.

Explicit list: indices hardcoded + futures/^ from COMMODITY_SYMBOLS + ETFs.
2026-03-20 10:24:55 +04:00
..