Premium API Pull the data into your own code
Premium members get a read-only API over the scored trade feed and the full score breakdown — for research, backtesting, or piping into your own tools — plus bulk downloads (CSV / JSON / Parquet), a drop-in Python SDK, and free reference datasets. Here's how it works.
Authentication
Every request needs your API key, which you generate from your account. Send it in the header:
curl -H "Authorization: Bearer YOUR_KEY" \ "https://quantcapitol.com/api/v1/trades?min_score=90"
If your client or our host strips the Authorization header, use the X-Api-Key header instead, or the ?key=YOUR_KEY query parameter — all three work:
curl -H "X-Api-Key: YOUR_KEY" "https://quantcapitol.com/api/v1/trades.php?min_score=90" curl "https://quantcapitol.com/api/v1/trades.php?key=YOUR_KEY&min_score=90"
Keys are tied to active premium membership.
Rate limits
1,000 requests per hour per key. Every response includes X-RateLimit-Remaining so you can pace your calls. Exceed it and you'll get a 429 until the next hour.
GET /api/v1/trades
The scored trade feed. Optional filters:
- min_score — only trades at or above this interest score (0–100)
- ticker — a single symbol, e.g. NVDA
- type — BUY or SELL
- limit — rows per page, 1–1000 (default 100); offset for paging
{
"data": [
{
"transaction_date": "2026-08-11",
"pol_name": "…",
"ticker": "NVDA",
"transaction_type": "BUY",
"amount_display": "$1K–$15K",
"interest_score": 98,
"sector": "Technology"
// …
}
],
"meta": { "total": 143, "limit": 100, "offset": 0, "returned": 100 }
}
GET /api/v1/scores
The full per-trade score breakdown — every sub-component (recency, size, unusual, consensus, historical) behind the final interest score. Same filters as /trades (min_score, ticker, limit, offset). This is the raw calibration data, for those who want to see exactly how the number is built.
Enriched endpoints — computed analysis
Beyond the raw feed, these serve ready-made analysis so you don't have to aggregate it yourself:
- GET /api/v1/politicians — every member with computed metrics: trade counts, jurisdiction overlap, timing edge, favorite sectors. Add ?slug=nancy-pelosi for one member, or ?min_trades=20 to filter.
- GET /api/v1/clusters — cross-party / consensus clusters (a stock traded by several members), with the buy/sell split. Filter with ?min_politicians=3.
- GET /api/v1/sectors — per-sector reports: net money flow, most active traders, most-traded tickers, active legislation. Add ?sector=Technology for one sector.
- GET /api/v1/overlap — Congress × corporate-insider (SEC Form 4) convergence events: where a member and the company's own officers/directors traded the same ticker the same way within 60 days. Filter with ?ticker=NVDA, ?direction=convergence or ?min_strength=moderate. Context, not a signal — see the honest calibration.
Every row on /trades also carries a compact ins field when corporate insiders traded that ticker nearby — {"d": "convergence|divergence", "s": "strong|moderate|weak", "n": <insiders>} — so you get the overlap inline without a second call.
curl -H "X-Api-Key: YOUR_KEY" \ "https://quantcapitol.com/api/v1/politicians.php?slug=nancy-pelosi"
Python SDK
A tiny, dependency-free client (standard library only — pandas optional). Download quantcapitol.py, drop it next to your code, and:
from quantcapitol import QuantCapitol
qc = QuantCapitol("YOUR_KEY")
# Highest-interest trades as a list of dicts
for t in qc.trades(min_score=90, limit=20):
print(t["transaction_date"], t["pol_name"], t["ticker"], t["interest_score"])
# Page through the entire matching history, lazily
n = sum(1 for _ in qc.iter_trades(min_score=80))
# As a pandas DataFrame (pip install pandas)
df = qc.trades_df(ticker="NVDA")
It handles auth, paging and retry/back-off on rate limits for you. Methods: trades(), iter_trades(), scores(), politicians(), clusters(), sectors(), and the *_df pandas helpers.
Bulk downloads
For a full snapshot rather than paged calls, premium members can download the complete trade history in one file — ideal for loading into a notebook or a data warehouse:
- Parquet — columnar, typed, compressed (best for analytics): https://quantcapitol.com/accounts/export.php?format=parquet
- Excel (.xlsx) — a real workbook: …/export.php?format=xlsx
- CSV — …/export.php?format=csv
- JSON — …/export.php?format=json
- Insider overlap (CSV) — the full Congress × Form 4 convergence dataset: …/export.php?format=overlap
These are gated to your logged-in premium session (not the API key). Parquet needs no client library server-side; it's pre-built each day.
Reference data — free
The mapping tables behind the analysis are public, so you can resolve tickers and committees cleanly in your own pipeline without a key:
- https://quantcapitol.com/static/reference/committee-sector-map.json — each congressional committee → the market sectors it oversees (the exact mapping used for conflict detection).
- https://quantcapitol.com/static/reference/securities.csv (and .json) — every traded ticker → company name + sector.
Both refresh with each build. The trade feed itself stays premium.
Fair use & honesty
The interest score is our own ex-ante ranking — an attention filter, not a return forecast (see Does it work?). The data is derived from official House and Senate disclosures. Not investment advice. Please don't hammer the API or redistribute the raw feed wholesale — it's for your own research.
Ready to start? Generate an API key →