Metadata-Version: 2.5
Name: signal8
Version: 0.1.0
Summary: Python client for the Signal8 API: SEC filings, insider and Congress trades, 13F holdings and dilution data for US stocks.
Project-URL: Homepage, https://signal8.ai
Project-URL: Documentation, https://signal8.ai/developer
Project-URL: API keys, https://signal8.ai/developer/api-keys
Project-URL: MCP server, https://signal8.ai/mcp
Author-email: Signal8 <business@signal8.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: 13f,api,dilution,edgar,filings,finance,insider trading,sec,stocks
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Investment
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: requests>=2.28
Provides-Extra: test
Requires-Dist: pytest>=7; extra == 'test'
Requires-Dist: responses>=0.23; extra == 'test'
Description-Content-Type: text/markdown

# signal8

Python client for the [Signal8](https://signal8.ai) API: SEC filings and full-text search,
Form 4 insider trades, 13F institutional holdings, trades by members of Congress and
executive-branch officials, quotes, and dilution data (warrants, convertibles, shelves, ATMs,
equity lines, cash runway) for US-listed stocks.

A thin wrapper over the documented REST API. Every method returns the parsed JSON body
unchanged, so field names match the API reference at
[signal8.ai/developer](https://signal8.ai/developer).

## Install

```bash
pip install signal8
```

Python 3.9 or newer. The only dependency is `requests`.

## API key

API access is part of Signal8 Pro (120 requests a minute, 10,000 a day, up to 3 keys). Create
a key at [signal8.ai/developer/api-keys](https://signal8.ai/developer/api-keys). Test keys
(`sk_test_...`) return real data at 10 requests a minute and are useful while you integrate.

```bash
export SIGNAL8_API_KEY=sk_live_your_key_here
```

## Usage

```python
from signal8 import Signal8, Signal8Error

s8 = Signal8()  # reads SIGNAL8_API_KEY, or Signal8(api_key="sk_live_...")

# Companies
s8.search_companies("co-diagnostics", limit=5)
s8.company("CODX")              # also accepts a former ticker or a CIK
s8.quote("AAPL")
s8.quotes(["AAPL", "MSFT"])     # up to 500 tickers in one call
s8.split_history("AAPL")

# Insiders and institutions
s8.insider_transactions("AAPL", year=2026, transaction_code="P")
s8.insider_cluster_buys("AAPL")
s8.institutions("AAPL")
s8.institution_holdings(1067983, limit=20)

# Dilution: check coverage first, it is the cheap call
cov = s8.dilution_coverage("AZTR")
risk = s8.dilution_risk("AZTR")
warrants = s8.dilution_instruments("AZTR", "warrants")
cash = s8.cash_position("AZTR")

# Filings
s8.edgar_filings(formTypes="8-K", dateFrom="2026-11-01", pageSize=25)
s8.edgar_search_text("going concern", formType="10-Q", limit=10)
s8.accession("0001193125-26-458624")

# Market and Congress
s8.movers("gainers", session="premarket", market_cap_max=300_000_000)
s8.trading_halts()
s8.congress_trades_by_ticker("NVDA", days=90)

# Anything else in the API reference
s8.get("/calendar/earnings", **{"from": "2026-11-23", "to": "2026-11-27"})
```

### Errors

Non-2xx responses raise `Signal8Error` with the API's error code:

```python
try:
    s8.dilution_risk("AZTR")
except Signal8Error as e:
    print(e.status, e.code, e)   # e.g. 403 FEATURE_NOT_AVAILABLE ...
```

429 and 502/503/504 responses are retried (`max_retries=2` by default, honouring
`Retry-After`).

### Usage headers

After each call, `s8.rate_limit` holds the rate-limit, daily-allowance and credit headers from
the last response:

```python
s8.quote("AAPL")
print(s8.rate_limit.remaining, s8.rate_limit.daily_remaining)
```

### Reading the data

The API reports a value it could not measure as missing (null or `available: false` with a
reason), never as zero. A company without a dilution analysis returns `not_covered`, which is
not the same as having no dilution. This client passes those responses through unchanged.

## Related

- MCP server for Claude, ChatGPT, Cursor and other MCP clients: [signal8.ai/mcp](https://signal8.ai/mcp)
- Free CC BY 4.0 datasets (reverse splits, listing deficiency notices): [signal8.ai/datasets](https://signal8.ai/datasets)

## Licence

MIT. Use of the API is subject to the [Signal8 Terms](https://signal8.ai/terms). Nothing
returned by the API is investment advice.

## Maintainer notes: publishing

Not yet on PyPI. To publish (from this directory, with a PyPI API token for the `signal8`
project; the name was unclaimed on 2026-11-20):

```bash
python -m pip install --upgrade build twine
rm -rf dist && python -m build                  # dist/signal8-0.1.0.tar.gz + .whl
python -m twine check dist/*
python -m twine upload --repository testpypi dist/*   # optional dry run on test.pypi.org
python -m twine upload dist/*                          # username __token__, password = PyPI token
```

Bump `version` in `pyproject.toml` and `__version__` in `src/signal8/__init__.py` together.
