@ckirg/corelib-markets - v0.4.1
    Preparing search index...

    Class MarketSymbols

    Nasdaq symbol directory backed by a SymbolStore (SQLite or Turso today) alongside API & Ingestor fallbacks.

    Automatically refreshes on first use or when data is older than today (NY time). Modifies search hierarchy (DB vs API) dynamically based on edge vs non-edge runtimes.

    Index
    • Parameters

      • Optionaldb: string | Database | SymbolStore | { dbToken: string; dbUrl: string }

        Optional storage configuration or existing instance:

        • undefined → chosen by markets.nasdaq.symbols.store (default sqlite: ${getTempDir()}/NasdaqSymbols.sqlite; turso / mongodb read their connection settings from the environment, see the ts-markets README section 7)
        • string → local SQLite file path; a mongodb:// or mongodb+srv:// string → MongoDB store
        • { dbUrl: string; dbToken: string } → Turso/LibSQL remote
        • Database → An existing instance of a Database driver (never disconnected by close())
        • SymbolStore → An existing store (never closed by close())
      • ingestors: string[] = []

        Array of ingestor URLs (e.g., Google App Script endpoints) to query for missing symbols.

      Returns MarketSymbols

    • Get symbol data. Searches Nasdaq API, external ingestors, and the DB. The sequence order is optimized dynamically based on whether it is running in an Edge environment.

      Parameters

      • symbol: string

      Returns Promise<MarketSymbolRow | null>

      null if the symbol is not found or is inactive.