MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / readMarketDataConfig

Function readMarketDataConfig

src/core/config.ts:821–828  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

819
820/** Read market data config from disk (called per-request for hot-reload). */
821export 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.

Callers 4

getEquityVendorsFunction · 0.85
config.spec.tsFile · 0.85
listMarketVendorsFunction · 0.85
setMarketVendorFunction · 0.85

Calls 2

applyGlobalProviderKeysFunction · 0.85
parseMethod · 0.80

Tested by

no test coverage detected