Metadata-Version: 2.4
Name: quantjourney-api
Version: 0.1.1
Summary: Python SDK for QuantJourney qj-api product contracts.
Author: QuantJourney
License-Expression: LicenseRef-Proprietary
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: quantjourney-common-sdk<0.2,>=0.1.1
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"
Provides-Extra: frames
Requires-Dist: pandas>=2.0.0; extra == "frames"

# quantjourney-api

Python SDK for the public/product `qj-api` contract.

Canonical package metadata:

| Field | Value |
| --- | --- |
| Repository | `_repo_qj_api_sdk` |
| Distribution | `quantjourney-api` |
| Python import | `qj.api` |
| Runtime client | `QJ` |
| Backend boundary | `qj-api` / `https://api.quantjourney.cloud` |
| Version | `0.1.1` |
| Git tag | `api-v0.1.1` |

`quantjourney-api` is the public product/API SDK. The `quantjourney` umbrella
package lives in `packages/quantjourney` and installs `quantjourney-api`.

```python
from qj.api import QJ, QuantJourneyAPI

qj = QJ.from_env()
health = qj.health()
capabilities = qj.capabilities()

# Provider connectors through qj-api
profile = qj.fmp.get_company_profile(symbol="NVDA")
gdp = qj.fred.get_series(series_id="GDP")
filings = qj.sec.get_recent_filings(limit=5)

# Provider-agnostic domain routes
routes = qj.domains.list()
prices = qj.domains.equity.pricing.get_historical_prices(symbol="NVDA")

# Product API surfaces
analytics = qj.analytics.registry()
ratios = qj.ratios.available(source="eod")
indicators = qj.technical.available()

# Compatibility aliases
qj2 = QuantJourneyAPI.from_env()
```

Local smoke from this checkout:

```bash
python scripts/qj_api_smoke.py --env .env
python scripts/endpoint_matrix.py --env .env
python scripts/endpoint_matrix.py --env .env --list
python scripts/endpoint_matrix.py --env .env --group connectors --allow-failures
python scripts/endpoint_matrix.py --env .env --group connector_examples --include-connector-examples --allow-failures
python scripts/connector_matrix.py --env .env
```

`scripts/connectors.json` stores one smoke example per connector. The endpoint
matrix verifies every connector route; `connector_matrix.py` runs the examples
and prints a compact result table.

Environment variables:

| Variable | Purpose |
| --- | --- |
| `QJ_API_URL` | qj-api base URL, default `https://api.quantjourney.cloud` |
| `QJ_API_TOKEN` | bearer token |
| `QJ_AUTH_URL` | qj-auth base URL for token exchange |
| `QJ_API_KEY` | `QJ_live_*` API key used to mint `QJ_API_TOKEN` |
| `QJ_API_CLIENT_ID` | service account client id for `client_credentials` |
| `QJ_API_CLIENT_SECRET` | `QJ_svc_*` service secret for `client_credentials` |
| `QJ_API_TENANT_ID` | optional tenant projection |
| `QJ_API_TEAM_ID` | optional team projection |

Install from PyPI:

```bash
pip install quantjourney-api==0.1.1
```

`quantjourney-common-sdk` is installed automatically as a dependency. Local
development can still use editable path installs for sibling checkouts.

The new surface keeps the smaller `qj.api` namespace, uses
`quantjourney-common-sdk` for
auth/transport, exposes dynamic qj-api connector clients, and keeps warehouse
data-plane concerns in `quantjourney-data`.
