Developers · Guides · Trades as JSON
Every stock trade a member of Congress discloses is available from the API as JSON. This guide downloads Nancy Pelosi's, from lookup to CSV. Swap in any other member to do the same for them.
Updated October 9, 2026
DC_API_KEY environment variable.Member pages on this site end in a slug: disclosedcapitol.com/politicians/nancy-pelosi. The API takes the same slug and returns the member's profile, including the numeric politician_id the trade endpoints use.
curl -H "DC-API-Key: $DC_API_KEY" \
"https://api.disclosedcapitol.com/politicians/nancy-pelosi"{
"politician_id": 58,
"name": "Nancy Pelosi",
"party": "D",
"state": "CA",
"chamber": "House",
"slug": "nancy-pelosi",
"bioguide_id": "P000197",
"trade_count": 250,
"enriched_trades": 218
// ...plus performance stats: win rate, alpha, Sharpe ratio, portfolio return
}Don't know the slug? GET /politicians?search=pelosi searches by name and returns {"politicians": [...], "total": ...} with the same fields. Either lookup costs 15 credits.
GET /politicians/{id}/trades returns everything the member has disclosed, newest transaction first. limit sets the page size (default 25, maximum 1000) and offset skips rows.
curl -H "DC-API-Key: $DC_API_KEY" \
"https://api.disclosedcapitol.com/politicians/58/trades?limit=2"[
{
"id": 294530,
"politician_id": 58,
"ticker": "N/A",
"politician_name": "Nancy Pelosi",
"party": "D",
"state": "CA",
"chamber": "House",
"trade_type": "Buy",
"asset_type": "Stock",
"asset_description": "REOF XXX, LLC",
"amount_range": "$500,001 - $1,000,000",
"amount_low": 500001.0,
"amount_high": 1000000.0,
"transaction_date": "2026-09-08",
"disclosure_date": "2026-10-02",
"days_to_disclose": 24,
"source": "house.gov",
"sector": null,
"price_on_trade_date": null,
"gain_30d": null
// ...
},
{
"id": 263708,
"politician_id": 58,
"ticker": "BE",
"politician_name": "Nancy Pelosi",
"party": "D",
"state": "CA",
"chamber": "House",
"trade_type": "Buy",
"asset_type": "Stock",
"asset_description": "Bloom Energy Corporation Class A Common Stock",
"amount_range": "$500,001 - $1,000,000",
"amount_low": 500001.0,
"amount_high": 1000000.0,
"transaction_date": "2026-07-28",
"disclosure_date": "2026-08-21",
"days_to_disclose": 24,
"source": "house.gov",
"sector": "Industrials",
"industry": "Electrical Equipment & Parts",
"price_on_trade_date": 166.84,
"price_on_disclosure": 201.45,
"gain_30d": 34.55,
"alpha_30d": 31.05,
"current_return": 64.28,
"days_held": 73
// ...
}
]The first trade is an LLC interest with no public ticker, so ticker is "N/A" and the price and performance fields are null. A call costs 15 credits plus 1 per trade returned; this one cost 17.
To narrow the list, call GET /trades with politician_id and any of its filters:
# Her purchases disclosed in the last 365 days.
# -G sends each -d as a query parameter.
curl -G -H "DC-API-Key: $DC_API_KEY" "https://api.disclosedcapitol.com/trades" \
-d politician_id=58 -d trade_type=buy -d days=365 -d limit=100
# Her option trades disclosed in the last 3 years, oldest first
curl -G -H "DC-API-Key: $DC_API_KEY" "https://api.disclosedcapitol.com/trades" \
-d politician_id=58 -d asset_type=Option -d days=1095 \
-d sort_by=transaction_date -d sort_dir=asc -d limit=100days counts back from today by disclosure date and defaults to 30, so set it (up to 3650), or send date_from and date_to together (YYYY-MM-DD) for an exact range.trade_type=buy and trade_type=sell match the Buy and Sell labels on the trades page, whatever wording the filing used.trade_type, asset_type or sector leaves out trades whose ticker is "N/A", such as the LLC interest above. GET /politicians/{id}/trades always includes them.GET /trades also fills option_type, strike_price and option_expiry.The quickstart lists the main /trades filters, and the API reference has the rest.
This script looks the member up, pages through all of their trades and writes a CSV:
import csv
import os
import requests # pip install requests
API = "https://api.disclosedcapitol.com"
HEADERS = {"DC-API-Key": os.environ["DC_API_KEY"]}
def get(path, **params):
r = requests.get(f"{API}{path}", headers=HEADERS, params=params, timeout=30)
r.raise_for_status()
return r
# 1. The slug from the member's page URL -> numeric politician_id
member = get("/politicians/nancy-pelosi").json()
pid = member["politician_id"]
# 2. Every disclosed trade, newest first, 100 per request
trades, seen, offset = [], set(), 0
while True:
r = get(f"/politicians/{pid}/trades", limit=100, offset=offset)
page = r.json()
for t in page:
if t["id"] not in seen: # rows can shift if a new filing lands mid-run
seen.add(t["id"])
trades.append(t)
if len(page) < 100:
break
offset += 100
left = r.headers["X-Credits-Remaining"]
print(f"{member['name']}: {len(trades)} trades, {left} credits left")
# 3. Save the columns you need
columns = [
"transaction_date", "disclosure_date", "ticker", "asset_description",
"trade_type", "amount_range", "amount_low", "amount_high",
]
with open("pelosi_trades.csv", "w", newline="") as f:
writer = csv.DictWriter(f, fieldnames=columns, extrasaction="ignore")
writer.writeheader()
writer.writerows(trades)At the time of writing Nancy Pelosi has 250 disclosed trades, so the script makes 4 requests and costs 310 credits: 15 for the lookup, then 15 per page plus 1 per trade.
Replace nancy-pelosi with another member's slug, the last part of their page URL on the politicians list. Senators and representatives work the same way. For every member's trades in one stock instead, call GET /tickers/{ticker}/trades, for example /tickers/NVDA/trades.
Each trade object has these fields. A field is null when it doesn't apply or isn't computed yet, such as a 30-day gain on a trade made last week.
| Field | What it is |
|---|---|
| id | The trade's id in Disclosed Capitol. |
| politician_id, politician_name, party, state | Who made the trade. |
| chamber | House, Senate or Executive. |
| ticker | The ticker, or "N/A" when the asset has no public ticker. |
| trade_type | The transaction type as written on the filing. |
| asset_type, asset_description | The kind of asset, and its name as written on the filing. |
| amount_range, amount_low, amount_high | The disclosed dollar range, as text and as numbers. Filings give ranges, not exact amounts. |
| transaction_date, disclosure_date, days_to_disclose | When the trade happened, when it was disclosed, and the days in between. |
| source | Where it was filed: house.gov, senate.gov or oge.gov. |
| sector, industry | The company's sector and industry. |
| price_on_trade_date, price_on_disclosure | The share price on each date. |
| gain_7d, gain_30d, gain_60d, gain_90d, gain_1yr | Performance in percent over each window, starting from the transaction date. |
| alpha_30d, alpha_90d, alpha_1yr | The gain minus the S&P 500's return over the same window. * |
| public_gain_30d, public_gain_90d, public_gain_180d | The same performance measured from the disclosure date, when the trade became public. |
| public_alpha_30d, public_alpha_90d, public_alpha_180d | Those public-date gains minus the S&P 500. * |
| current_return, current_alpha | Performance from the transaction date to the latest price, for trades from the last two years. * |
| days_held | Days since the transaction date, alongside current_return. |
| option_type, strike_price, option_expiry | Call or put, strike and expiry for option trades. Filled by GET /trades. |
| conviction_score | Disclosed Capitol's rating of how notable the trade is. * |
| peer_z_score | How the trade's 30-day gain compares with other members' trades in the same stock and direction within 30 days, as a z-score. |
| is_ma_affected | 1 when a merger or acquisition affected the stock's price history. |
* Included with Core, Pro and Max. For a key on an account without a plan, these come back as null.
How prices, gains and alpha are calculated is on the Methodology page. The STOCK Act gives members up to 45 days to disclose a trade, so recent activity reaches the data with that lag.
The API is licensed for personal use and for news and media use (Terms Section 9.1). For any other use, email admin@disclosedcapitol.com for written permission.