()
| 819 | |
| 820 | /** Read market data config from disk (called per-request for hot-reload). */ |
| 821 | export async function readMarketDataConfig() { |
| 822 | try { |
| 823 | const raw = JSON.parse(await readFile(resolve(CONFIG_DIR, 'market-data.json'), 'utf-8')) |
| 824 | return applyGlobalProviderKeys(marketDataSchema.parse(raw)) |
| 825 | } catch { |
| 826 | return applyGlobalProviderKeys(marketDataSchema.parse({})) |
| 827 | } |
| 828 | } |
| 829 | |
| 830 | /** |
| 831 | * Toggle market-data `extraVendors` on/off, persisted to disk. Returns the new list. |
no test coverage detected