100 free credits. No credit card required. Get a key

Congress trading by party API

Trades, buys, sells, trading members and volume per party.

GET /v1/uscongresstrades/stats/party1 credit per callRefunded on failure
import 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.

FieldTypeDescription
partiesobject[]
Status codes
StatusMeaning
200One row per party.
400Invalid input. Nothing was charged.
401Missing or invalid API key.
402Not enough credits, a spend cap was reached, or payment is required.
403The target is private, or the account is suspended.
404No member, ticker or trade matches.
429Too many requests. Wait for Retry-After seconds.
503US 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).