`@fin.cx/opendata` is a TypeScript toolbox for serious data plumbing: market data, SEC fundamentals, German company registry workflows, and locally synced law corpora. It is built for programmers who want scriptable APIs, local persistence, and real workflows instead of a thin wrapper around one remote endpoint.
It currently gives you four practical lanes in one package:
-`StockPriceService` for stock and crypto prices with caching, retries, failover, historical ranges, and intraday support
-`FundamentalsService` and `StockDataService` for SEC fundamentals and combined price + fundamentals payloads
-`OpenData` for German company ingestion plus browser-driven Handelsregister lookup and document download
-`LawService` for syncing and searching German, EU, and US law texts in a local embedded database
## Issue Reporting and Security
For reporting bugs, issues, or security vulnerabilities, please visit [community.foss.global/](https://community.foss.global/). This is the central community hub for all issue reporting. Developers who sign and comply with our contribution agreement and go through identification can also get a [code.foss.global/](https://code.foss.global/) account to submit Pull Requests directly.
Starts a local embedded database, imports the public German company JSONL dump, and exposes a `handelsregister` helper for company lookup and file download.
- No stock or fundamentals providers are pre-registered. You must register them before calling the services.
-`MarketstackProvider` requires an API key.
-`SecEdgarProvider` requires a valid `User-Agent` string in the format `Company Name email@example.com`.
-`CoinGeckoProvider` works without an API key, but a key gives you better rate limits.
-`OpenData` requires `nogitDir`, `downloadDir`, and `germanBusinessDataDir`.
-`OpenData.start()` is required before using `OpenData.handelsregister` or `buildInitialDb()`.
-`LawService` stores data locally. It auto-starts on demand, but explicit `start()` and `stop()` keep lifecycle handling cleaner.
- EU law syncing and Handelsregister access use a headless browser under the hood.
-`StockDataService` defaults to a 24 hour price cache. If you want fresher quote caching, pass `cache.priceTTL` explicitly or use `StockPriceService` directly.
`OpenData` is the local workflow layer for German company data. It creates its directories, boots an embedded SmartDB-backed database, and starts a browser automation session for Handelsregister access.
-`handelsregister.getSpecificCompany({ court, type, number })`
-`handelsregister.getSpecificCompanyByName(name)`
### `LawService`
-`start()`
-`stop()`
-`getLaw(request)`
-`syncLaw(request)`
-`syncLaws(request)`
-`searchLaws({ query, jurisdiction?, limit? })`
## Behavior And Caveats
- Historical market data is cached aggressively because it is treated as immutable.
- Intraday data uses interval-aware caching and tries incremental refreshes for recent data.
-`StockDataService` is convenience-first. `StockPriceService` is the better low-level choice if you care about request-shape-specific cache behavior.
-`OpenData` is a real workflow layer, not just types. It writes local data, launches a browser, and manages downloads.
- Handelsregister and EUR-Lex integrations depend on current site structure. They are practical automation workflows, not guaranteed stable official APIs.
- The most useful public `OpenData` features today are startup, JSONL import, and Handelsregister operations. Some extra validation/search helper methods exist in source but are still stubs.
-`LawService` persists synced laws locally, so repeated searches can stay offline once the data has been synced.
- There is no hosted backend in this package. Everything is meant to run from your own TypeScript/Node process.
**Please note:** The MIT License does not grant permission to use the trade names, trademarks, service marks, or product names of the project, except as required for reasonable and customary use in describing the origin of the work and reproducing the content of the NOTICE file.
This project is owned and maintained by Task Venture Capital GmbH. The names and logos associated with Task Venture Capital GmbH and any related products or services are trademarks of Task Venture Capital GmbH or third parties, and are not included within the scope of the MIT license granted herein.
Use of these trademarks must comply with Task Venture Capital GmbH's Trademark Guidelines or the guidelines of the respective third-party owners, and any usage must be approved in writing. Third-party trademarks used herein are the property of their respective owners and used only in a descriptive manner, e.g. for an implementation of an API or similar.
By using this repository, you acknowledge that you have read this section, agree to comply with its terms, and understand that the licensing of the code does not imply endorsement by Task Venture Capital GmbH of any derivative works.