Metadata-Version: 2.4
Name: tenkcalls
Version: 0.1.0
Summary: Python client for the TENK/calls API — SEC-grounded fundamentals, the TENK Score, filing & 8-K event feeds, and AI research calls.
Project-URL: Documentation, https://tenkcalls.com/developers
Project-URL: Reference, https://tenkcalls.com/developers/reference
Author: TENK/calls
License: MIT
Keywords: api,edgar,finance,fundamentals,sec,stocks
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27
Requires-Dist: pydantic>=2.6
Provides-Extra: pandas
Requires-Dist: pandas>=2.0; extra == 'pandas'
Description-Content-Type: text/markdown

# tenkcalls (Python)

Python client for the **TENK/calls API** — SEC-grounded fundamentals, the
**TENK Score** (0–100 quality composite), SEC filing & 8-K event feeds, and AI
research calls, for any US-listed ticker.

```bash
pip install tenkcalls              # add [pandas] for DataFrame output
```

## Quickstart

```python
from tenkcalls import Client

c = Client()  # reads TENK_API_KEY (or pass api_key="tk_live_…")

# TENK Score
s = c.score("AAPL")
print(s.score.composite, s.score.grade, s.score.factorGrades)

# Normalized SEC fundamentals
f = c.fundamentals("AAPL")
print(f.fundamentals["metrics"]["revenue"])

# Filings / 8-K events / search — straight to a DataFrame
df = c.search("apple", as_dataframe=True)
filings = c.filings("AAPL", limit=10, as_dataframe=True)
events = c.events("AAPL", as_dataframe=True)

# AI research call (Pro plan)
call = c.call("AAPL")
print(call["call"]["rating"], call["call"]["priceTarget"])

# Live quote — bring-your-own EODHD key (market data isn't redistributed)
q = c.quote("AAPL", data_key="your-eodhd-token")
```

## Config
- `api_key` — or env `TENK_API_KEY`.
- `base_url` — or env `TENK_BASE_URL` (point at your deployment).
- `timeout`, `max_retries` — retries honor `429` + `Retry-After` with backoff.

## Notes
- List endpoints (`search`, `filings`, `events`) accept `as_dataframe=True` (needs the `pandas` extra).
- Errors: `AuthError` (401), `UpgradeRequiredError` (402), `NotFoundError` (404), `RateLimitError` (429), `ApiError` (other).
- `quote()` is bring-your-own-key: market data is third-party licensed and not redistributed.

Docs: `/developers` · interactive reference: `/developers/reference` · spec: `/openapi.json`. MIT.

---

_EDGAR® is a trademark of the U.S. SEC. TENK/calls is not affiliated with or approved by the SEC._
