Congress trading by party API
Trades, buys, sells, trading members and volume per party.
GET /v1/uscongresstrades/stats/party1 credit per callRefunded on failureimport os, requests
res = requests.get(
"https://api.groundsocial.dev/v1/uscongresstrades/stats/party",
headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()Response
200 · 1 credit{ "parties": [ { "party": "democrat", "trades": 22059, "buys": 11284, "sells": 10725, "politicians": 84, "volume": 934922955 }, { "party": "republican", "trades": 14249, "buys": 7229, "sells": 6932, "politicians": 124, "volume": 1196303315 }, "… 1 more" ]}Response fields
200 with a CongressPartyStats, in US Congress trades’s own JSON.
| Field | Type | Description |
|---|---|---|
parties | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | One row per party. |
400 | Invalid input. Nothing was charged. |
401 | Missing or invalid API key. |
402 | Not enough credits, a spend cap was reached, or payment is required. |
403 | The target is private, or the account is suspended. |
404 | No member, ticker or trade matches. |
429 | Too many requests. Wait for Retry-After seconds. |
503 | US Congress trades is temporarily unavailable. Retryable; nothing was charged. |
Every error has code, message, hint and retryable. All error codes
Questions
Which parties?
Democrats, Republicans and other.
US Congress trades is a trademark of 2iQ Research (Capitol Trades). We are not affiliated with or endorsed by 2iQ Research (Capitol Trades).