Metadata-Version: 2.4
Name: apexquant-news-datasources
Version: 0.1.1
Summary: Official Arithmion news TextSource plugins — independent providers, not bundled with the core app.
License-Expression: MIT
Project-URL: Homepage, https://github.com/Arithmion-git/apexquant-news-datasources
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: arithmion-core>=0.1.0
Provides-Extra: yfinance
Requires-Dist: yfinance; extra == "yfinance"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# apexquant-news-datasources

Official Arithmion news data-source plugins. This is a **pip plugin**, not a
bundled/built-in datasource — it ships independently of the main Arithmion
app and is discovered at runtime through Arithmion's `apexquant.datasources`
entry-point group, the same mechanism used by
[`apexquant-example-datasource`](https://github.com/Arithmion-git).

## Providers

Each provider is its own `TextSource` subclass, registered as its own
`apexquant.datasources` entry point — no aggregator, no forced bundling.
Consume them individually via `make_text_source("<entry point>")`, or call
several and combine the results yourself.

| Entry point | Provider | Env var | Notes |
| --- | --- | --- | --- |
| `finnhub_news` | [Finnhub](https://finnhub.io) | `FINNHUB_API_KEY` | Company news, North American coverage, ~1 year of history |
| `polygon_news` | [Polygon.io](https://polygon.io) | `POLYGON_API_KEY` | Same env var and auth style as the bundled Polygon OHLCV source — reuses an existing key |
| `alphavantage_news` | [Alpha Vantage](https://www.alphavantage.co) | `ALPHAVANTAGE_API_KEY` | Also surfaces per-ticker sentiment scores in `TextDocument.metadata` |
| `fmp_news` | [Financial Modeling Prep](https://financialmodelingprep.com) | `FMP_API_KEY` | Full article body, not just headlines |
| `tiingo_news` | [Tiingo](https://www.tiingo.com) | `TIINGO_API_KEY` | Multi-ticker articles fan out to one document per requested, matched symbol |
| `benzinga_news` | [Benzinga](https://www.benzinga.com) | `BENZINGA_API_KEY` | Same multi-ticker fan-out behavior as Tiingo |
| `yfinance_news` | Yahoo! Finance (via [`yfinance`](https://pypi.org/project/yfinance/)) | — (keyless) | Requires the `[yfinance]` extra — see below |

Set only the env vars for the providers you actually use; none are required
unless you instantiate that specific provider.

## Reference, not derived

This package's provider list and field design took inspiration from how
[FinceptTerminal](https://github.com/Fincept-Corporation/FinceptTerminal) and
[OpenBB](https://github.com/OpenBB-finance/OpenBB) shape their own news
data — which providers to support, how to normalize fields across them. **No
code, package, or runtime dependency from either project is used here.**
Both are AGPL-3.0 (FinceptTerminal is additionally dual-licensed, requiring a
paid commercial license for any business use, "paid or free," regardless of
whether the software embedding it is itself open source) — reference-only use
avoids that entirely. The full rationale is recorded as an Architecture
Decision Record in the main Arithmion repository
(`docs/adr/0007-新闻插件仅参考-openbb-fincept-不依赖其代码.md`).

## Install

```bash
pip install apexquant-news-datasources
```

This plugin's only required dependency is
[`arithmion-core`](https://pypi.org/project/arithmion-core/) — the published
interface tier of the Arithmion platform (it ships the `apexquant` import
namespace `TextSource`/`TextDocument`/etc. are defined in).

Each provider is BYO-key (bring your own API key) via an environment
variable — no credentials are bundled or proxied. Providers requiring a
heavier optional dependency (e.g. `yfinance`) ship behind an extra:

```bash
pip install "apexquant-news-datasources[yfinance]"
```

## Development

```bash
pip install -e ".[test]"
pytest
```

## License

MIT — see [LICENSE](LICENSE).
