Congress trading by sector API
Trades, buys, sells and issuers traded per market sector.
GET /v1/uscongresstrades/stats/sectors1 credit per callRefunded on failureimport 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.
| Field | Type | Description |
|---|---|---|
sectors | object[] |
Status codes
| Status | Meaning |
|---|---|
200 | One row per sector. |
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 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).