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

Congress trading by sector API

Trades, buys, sells and issuers traded per market sector.

GET /v1/uscongresstrades/stats/sectors1 credit per callRefunded on failure
import os, requests

res = requests.get(
    "https://api.groundsocial.dev/v1/uscongresstrades/stats/sectors",
    headers={"Authorization": f"Bearer {os.environ['GROUNDSOCIAL_API_KEY']}"},
)
res.raise_for_status()
data = res.json()
Response
200 · 1 credit
{
"sectors": [
{
"sector": "information-technology",
"trades": 6210,
"buys": 3085,
"sells": 3113,
"issuers": 222
},
{
"sector": "financials",
"trades": 4913,
"buys": 2541,
"sells": 2359,
"issuers": 304
},
"… 9 more"
]
}
Response fields

200 with a CongressSectorStats, in US Congress trades’s own JSON.

FieldTypeDescription
sectorsobject[]
Status codes
StatusMeaning
200One row per sector.
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 sectors?

The eleven GICS sectors.

US Congress trades is a trademark of 2iQ Research (Capitol Trades). We are not affiliated with or endorsed by 2iQ Research (Capitol Trades).