API · US Congress trades
GET /uscongresstrades/stats/buy-sell
Buys against sells over a window, by party or sector.
| Request | GET /v1/uscongresstrades/stats/buy-sell |
| Operation id | uscongresstrades.stats.buy_sell |
| Cost | 1 credit, refunded if the call fails |
| Auth | API key: Authorization: Bearer <key> or x-api-key. |
Buys against sells over a window, by party or sector.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
days | integer | no | Window in days, 1 to 3650. Defaults to 30. |
party | "democrat" | "republican" | "other" | no | democrat, republican or other. One of democrat, republican, other. |
sector | "communication-services" | "consumer-discretionary" | "consumer-staples" | "energy" | "financials" | "health-care" | "industrials" | "information-technology" | "materials" | "real-estate" | "utilities" | no | One of communication-services, consumer-discretionary, consumer-staples, energy, financials, health-care, industrials, information-technology, materials, real-estate, utilities. |
Responses
| Status | Meaning | Schema |
|---|---|---|
200 | The counts. | CongressBuySell |
400 | Invalid input. Nothing was charged. | Error |
401 | Missing or invalid API key. | Error |
402 | Not enough credits, a spend cap was reached, or payment is required. | Error |
403 | The target is private, or the account is suspended. | Error |
404 | No member, ticker or trade matches. | Error |
429 | Too many requests. Wait for Retry-After seconds. | Error |
503 | US Congress trades is temporarily unavailable. Retryable; nothing was charged. | Error |
CongressBuySell fields
| Field | Type | Description |
|---|---|---|
days | integer | |
party | string | null | |
sector | string | null | |
buys | integer | |
sells | integer | |
ratio | number | null |
Errors use one shape everywhere; see Errors for every code and what to do.